|
@ -32,15 +32,6 @@ Component({ |
|
|
show: true |
|
|
show: true |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
"pagePath": "/pages/statistics/statistics", |
|
|
|
|
|
"text": "数据", |
|
|
|
|
|
"iconPath": "/images/home/information.png", |
|
|
|
|
|
"selectedIconPath": "/images/home/informationSelected.png", |
|
|
|
|
|
show: true |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
"pagePath": "/pages/mine/mine", |
|
|
"pagePath": "/pages/mine/mine", |
|
|
"text": "我的", |
|
|
"text": "我的", |
|
@ -53,26 +44,7 @@ Component({ |
|
|
attached() { |
|
|
attached() { |
|
|
}, |
|
|
}, |
|
|
ready: function () { |
|
|
ready: function () { |
|
|
this.setData({ |
|
|
|
|
|
selected: app.globalData.selected |
|
|
|
|
|
}) |
|
|
|
|
|
// secretary 书记 admin 管理员
|
|
|
|
|
|
console.log( app.globalData.roleList.filter(item => item.roleKey === 'secretary')) |
|
|
|
|
|
if(app.globalData.roleList.length <= 0) { |
|
|
|
|
|
|
|
|
|
|
|
getStaffbasicinfo().then(res=>{ |
|
|
|
|
|
getOwnedRolesOfStaffId(res.data.id).then(res2 => { |
|
|
|
|
|
app.globalData.user = res.data |
|
|
|
|
|
this.setData({ |
|
|
|
|
|
"list[3].show": res2.data.filter(item => item.roleKey === 'secretary' || item.roleKey === 'administrator' || item.roleKey === 'street_secretary').length > 0 |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
// this.setData({
|
|
|
|
|
|
// "list[3].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary' || item.roleKey === 'administrator' || item.roleKey === 'street_secretary').length > 0
|
|
|
|
|
|
// })
|
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
switchTab(e) { |
|
|
switchTab(e) { |
|
|