|
@@ -74,6 +74,7 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.selectComponent('#Annunciate').getList();
|
|
|
// if (wx.getAccountInfoSync().miniProgram.envVersion !== 'release') this.refreshData();
|
|
|
},
|
|
|
/**
|
|
@@ -90,58 +91,11 @@ Page({
|
|
|
if (page && wx.getStorageSync('userauth').length != 0) {
|
|
|
let authList = {},
|
|
|
entrance = [{
|
|
|
- label: "营销工具",
|
|
|
- icon: "work-yingxiaogongju",
|
|
|
- appid: "wx7505ddb0a1ec6146",
|
|
|
- list: gettool()
|
|
|
- }, {
|
|
|
label: "E-订单",
|
|
|
appid: "wx7505ddb0a1ec6146",
|
|
|
icon: "work-E-dingdan",
|
|
|
list: getedd()
|
|
|
}];
|
|
|
- //营销工具
|
|
|
- function gettool() {
|
|
|
- const paths = [{
|
|
|
- name: "通告",
|
|
|
- path: "/marketing/annunciate/index",
|
|
|
- icon: "work-a-shouyejingangqutonggao",
|
|
|
- objectname: "sat_notice"
|
|
|
- }, {
|
|
|
- name: "营销物料",
|
|
|
- path: "/marketing/mediaLibrary/index",
|
|
|
- icon: "work-a-shouyejingangquyingxiaowuliao",
|
|
|
- objectname: "sys_attachment"
|
|
|
- }, {
|
|
|
- name: "推广素材",
|
|
|
- path: "/marketing/promotional/index",
|
|
|
- icon: "work-a-shouyejingangqutuiguangsucai",
|
|
|
- objectname: "sat_sharematerial"
|
|
|
- }, {
|
|
|
- name: "商学院",
|
|
|
- path: "/marketing/college/index",
|
|
|
- icon: "work-a-shangxueyuanxuexi",
|
|
|
- objectname: "sat_courseware"
|
|
|
- }, {
|
|
|
- name: "提报",
|
|
|
- path: "/marketing/submission/index",
|
|
|
- icon: "work-a-tibaoguanlitibao",
|
|
|
- objectname: "sat_submiteditmodel"
|
|
|
- }];
|
|
|
- let tool = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['营销工具'], paths.map(v => v.name)),
|
|
|
- list = [];
|
|
|
- tool.forEach(v => {
|
|
|
- let auth = v.apps[0].meta.auth;
|
|
|
- if (!auth.some(r => r.option == 'read')) return;
|
|
|
- authList[v.apps[0].name] = {
|
|
|
- options: auth.map(a => a.option),
|
|
|
- optionnames: auth.map(a => a.optionname)
|
|
|
- };
|
|
|
- let item = paths.find(s => s.name == v.systemmodulename);
|
|
|
- item && list.push(item)
|
|
|
- });
|
|
|
- return dye(list.sort((a, b) => a.index - b.index))
|
|
|
- };
|
|
|
//E订单
|
|
|
function getedd() {
|
|
|
let paths = [{
|
|
@@ -209,8 +163,13 @@ Page({
|
|
|
key: "wfavorites",
|
|
|
path: "/packageA/favorites/index",
|
|
|
icon: "work-webshoucang"
|
|
|
+ }, {
|
|
|
+ name: "通告",
|
|
|
+ path: "/marketing/annunciate/index",
|
|
|
+ icon: "work-a-shouyejingangqutonggao",
|
|
|
+ objectname: "sat_notice"
|
|
|
}];
|
|
|
- let edd = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["E-订单"], ["商品档案", "销售管理", "财务管理", "售后管理", "发货管理", "业绩查询"]),
|
|
|
+ let edd = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["E-订单"], ["商品档案", "销售管理", "财务管理", "售后管理", "发货管理", "业绩查询", '消息中心']).concat(getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["通用"], ['消息中心'])),
|
|
|
list = [];
|
|
|
edd.forEach(v => {
|
|
|
v.apps.forEach(s => {
|
|
@@ -378,6 +337,7 @@ Page({
|
|
|
*/
|
|
|
async NavChange(e) {
|
|
|
let cur = e.currentTarget.dataset.cur;
|
|
|
+ if (cur == 'Home') this.selectComponent('#Annunciate').getList();
|
|
|
if (this.data.PageCur == cur) return;
|
|
|
if (cur == 'Market' || cur == 'Collect') {
|
|
|
let app = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ["E-订单"], ["商品档案"])[0].apps
|