|
|
@@ -37,7 +37,7 @@ Page({
|
|
|
let auth = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['营销工具'], ['通告', '推广素材', '商学院', '提报', '销售线索', '营销物料', '销售目标', '客户管理', '项目管理', '销售预测', '合同管理']),
|
|
|
gridList = [],
|
|
|
subassembly = [];
|
|
|
- console.log(auth)
|
|
|
+ let authList = {};
|
|
|
auth.forEach(v => {
|
|
|
switch (v.systemmodulename) {
|
|
|
case "通告":
|
|
|
@@ -112,7 +112,7 @@ Page({
|
|
|
icon: "icon-kehu",
|
|
|
apps: {}
|
|
|
})
|
|
|
- getApp().globalData.auth.wCustomer = {
|
|
|
+ authList.wCustomer = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -125,7 +125,7 @@ Page({
|
|
|
icon: "icon-xiaochengxutongxunlu",
|
|
|
apps: {}
|
|
|
})
|
|
|
- getApp().globalData.auth.wPublicCustomer = {
|
|
|
+ authList.wPublicCustomer = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -144,7 +144,7 @@ Page({
|
|
|
icon: "icon-xiangmushangji",
|
|
|
apps: {}
|
|
|
})
|
|
|
- getApp().globalData.auth.wproject = {
|
|
|
+ authList.wproject = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -157,7 +157,7 @@ Page({
|
|
|
icon: "icon-jingzhengduishou",
|
|
|
apps: {}
|
|
|
})
|
|
|
- getApp().globalData.auth.wcompetitor = {
|
|
|
+ authList.wcompetitor = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -170,7 +170,7 @@ Page({
|
|
|
icon: "icon-xiangmubaojia",
|
|
|
apps: {}
|
|
|
})
|
|
|
- getApp().globalData.auth.woffer = {
|
|
|
+ authList.woffer = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -192,7 +192,7 @@ Page({
|
|
|
})
|
|
|
setTimeout(this.getCount, 100);
|
|
|
}
|
|
|
- getApp().globalData.auth.worderclue = {
|
|
|
+ authList.worderclue = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -207,7 +207,7 @@ Page({
|
|
|
apps: {}
|
|
|
})
|
|
|
}
|
|
|
- getApp().globalData.auth.worderclue_public = {
|
|
|
+ authList.worderclue_public = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -222,7 +222,7 @@ Page({
|
|
|
apps: {}
|
|
|
})
|
|
|
}
|
|
|
- getApp().globalData.auth.wmarketing_activity = {
|
|
|
+ authList.wmarketing_activity = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -243,7 +243,7 @@ Page({
|
|
|
apps: {}
|
|
|
})
|
|
|
}
|
|
|
- getApp().globalData.auth.forecast = {
|
|
|
+ authList.forecast = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -262,7 +262,7 @@ Page({
|
|
|
icon: "icon-hetong",
|
|
|
apps: {}
|
|
|
})
|
|
|
- getApp().globalData.auth.wcontract = {
|
|
|
+ authList.wcontract = {
|
|
|
options: value.meta.auth.map(a => a.option),
|
|
|
optionnames: value.meta.auth.map(a => a.optionname),
|
|
|
}
|
|
|
@@ -275,20 +275,19 @@ Page({
|
|
|
break;
|
|
|
};
|
|
|
});
|
|
|
- if (!['美大'].includes(this.data.site)) {
|
|
|
- gridList.push({
|
|
|
- name: "联系人",
|
|
|
- path: "/packageA/contacts/index",
|
|
|
- icon: "icon-xiaochengxutongxunlu",
|
|
|
- apps: {}
|
|
|
- })
|
|
|
- gridList.push({
|
|
|
- name: "任务",
|
|
|
- path: "/packageA/work/index",
|
|
|
- icon: "icon-xiaochengxu_xiaoshouyuce",
|
|
|
- apps: {}
|
|
|
- })
|
|
|
- }
|
|
|
+ wx.setStorageSync('auth', authList)
|
|
|
+ gridList.push({
|
|
|
+ name: "联系人",
|
|
|
+ path: "/packageA/contacts/index",
|
|
|
+ icon: "icon-xiaochengxutongxunlu",
|
|
|
+ apps: {}
|
|
|
+ })
|
|
|
+ gridList.push({
|
|
|
+ name: "任务",
|
|
|
+ path: "/packageA/work/index",
|
|
|
+ icon: "icon-xiaochengxu_xiaoshouyuce",
|
|
|
+ apps: {}
|
|
|
+ })
|
|
|
/* 首页小组件查询 */
|
|
|
try {
|
|
|
let home = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['通用'], ['首页'])[0].apps[0].meta.wedgits;
|