|
@@ -15,17 +15,17 @@ Page({
|
|
|
loading: false,
|
|
|
isEvaluate: false
|
|
|
},
|
|
|
- onLoad(options) {
|
|
|
- let auth = options.auth.split(","),
|
|
|
+ async onLoad(options) {
|
|
|
+ let auth = [],
|
|
|
dataAuth = '';
|
|
|
+ (options.auth) ? auth = options.auth.split(","): await getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['营销工具'], ['通告'])[0].apps[0].meta.auth.forEach(v => auth.push(v.optionname));
|
|
|
if (auth.includes('团队内部数据分析') && auth.includes('经销商数据分析')) {
|
|
|
dataAuth = 'all';
|
|
|
} else {
|
|
|
dataAuth = options.auth.includes('团队内部数据分析') ? '内部' : '经销商'
|
|
|
};
|
|
|
- let viewData = options.auth.includes('团队内部数据分析') || options.auth.includes('经销商数据分析');
|
|
|
this.setData({
|
|
|
- viewData,
|
|
|
+ viewData: auth.includes('团队内部数据分析') || auth.includes('经销商数据分析'),
|
|
|
dataAuth,
|
|
|
auth,
|
|
|
sat_noticeid: options.id
|