Commit 56a312e4 by 李君

用户类型判断权限

1 parent 43e02ce5
......@@ -28,7 +28,29 @@ Component({
}
]
},
attached:function(){
let userType = wx.getStorageSync('userrole_type');
if(userType==3){
this.setData({
curClick:2,
list:[
{
"pagePath": "/pages/home/index",
"iconPath": "../images/cong.png",
"selectedIconPath": "../images/cong-b.png",
"text": "工作台",
"curr": 2
},
{
"pagePath": "/pages/me/index",
"iconPath": "../images/me.png",
"selectedIconPath": "../images/me-b.png",
"text": "我的",
"curr": 3
}]
})
}
},
methods: {
NavChange(e) {
// 获取穿过来的参数
......
......@@ -131,8 +131,13 @@ Page({
wx.setStorageSync({ data: datas[0].id, key: 'accountId' })
//wx.setStorage({ data: datas, key: 'accountList' })
wx.setStorage({ data: datas[0].name, key: 'accountName' })
if(res.data.user.type==3){
wx.reLaunch({ url: '/pages/home/index' })
}else{
wx.reLaunch({ url: '/pages/index/index' })
}
}
})
// 获取门店列表
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!