|
|
|
@ -23,6 +23,14 @@ Component({ |
|
|
|
"selectedIconPath": "/images/home/resiAndHouseSelected.png", |
|
|
|
show: true |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
"pagePath": "/pages/work2/work2", |
|
|
|
"text": "工作", |
|
|
|
"iconPath": "/images/home/work.png", |
|
|
|
"selectedIconPath": "/images/home/workSelected.png", |
|
|
|
show: true |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
"pagePath": "/pages/statistics/statistics", |
|
|
|
@ -32,14 +40,7 @@ Component({ |
|
|
|
show: false |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
"pagePath": "/pages/work2/work2", |
|
|
|
"text": "工作", |
|
|
|
"iconPath": "/images/home/work.png", |
|
|
|
"selectedIconPath": "/images/home/workSelected.png", |
|
|
|
show: true |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
"pagePath": "/pages/mine/mine", |
|
|
|
"text": "我的", |
|
|
|
@ -63,13 +64,13 @@ Component({ |
|
|
|
getOwnedRolesOfStaffId(res.data.id).then(res2 => { |
|
|
|
app.globalData.user = res.data |
|
|
|
this.setData({ |
|
|
|
"list[2].show": res2.data.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 |
|
|
|
"list[3].show": res2.data.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.setData({ |
|
|
|
"list[2].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 |
|
|
|
"list[3].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(app.globalData.roleList, 'userss') |
|
|
|
|