|
|
@@ -145,16 +145,6 @@ Page({
|
|
|
} else {
|
|
|
// // 接口登录后获取数据
|
|
|
_this.getInfoAfterLogin();
|
|
|
- // 调转主页--注意有场景值的情况
|
|
|
- if (this.data.scene) {
|
|
|
- wx.reLaunch({
|
|
|
- url: '../../pages/home-page/home-page?scene=' + this.data.scene,
|
|
|
- })
|
|
|
- } else {
|
|
|
- wx.reLaunch({
|
|
|
- url: '../../pages/home-page/home-page',
|
|
|
- })
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
else if (res.data.code === 1015) {
|
|
|
@@ -179,25 +169,47 @@ Page({
|
|
|
'userId': app.globalData.user.userId
|
|
|
}).then(res => {
|
|
|
if (res.data.code === Constants.SUCESS_CODE) {
|
|
|
- console.log('red',res);
|
|
|
+ console.log('red', res);
|
|
|
// 员工
|
|
|
let staff = res.data.data.staff
|
|
|
- if(staff){
|
|
|
+ if (staff && staff.staffId) {
|
|
|
app.globalData.user.staffId = staff.staffId
|
|
|
app.globalData.user.staffCode = staff.staffCode
|
|
|
app.globalData.user.staffName = staff.staffName
|
|
|
app.globalData.user.roleIds = staff.roleIds
|
|
|
app.globalData.user.orgId = staff.orgId
|
|
|
app.globalData.user.orgName = staff.orgName
|
|
|
+
|
|
|
+ // 调转主页--注意有场景值的情况
|
|
|
+ if (this.data.scene) {
|
|
|
+ wx.reLaunch({
|
|
|
+ url: '../../pages/home-page/home-page?scene=' + this.data.scene,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ wx.reLaunch({
|
|
|
+ url: '../../pages/home-page/home-page',
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
// 菜单
|
|
|
let menuList = res.data.data.menuList
|
|
|
- if(menuList){
|
|
|
+ if (menuList) {
|
|
|
app.globalData.menus = menuList
|
|
|
}
|
|
|
+ // 常用菜单
|
|
|
+ let comMenuList = res.data.data.comMenuList
|
|
|
+ if (comMenuList) {
|
|
|
+ app.globalData.comMenuList = comMenuList
|
|
|
+ }
|
|
|
+ // 系统参数
|
|
|
+ let setting = res.data.data.settingValue
|
|
|
+ if(setting){
|
|
|
+ app.globalData.setting = JSON.parse(setting.setting.value)
|
|
|
+ // console.log('setting', app.globalData.setting[Constants.settingCode.IVT001]);
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- console.log('app.globalData',app.globalData);
|
|
|
+ console.log('app.globalData', app.globalData);
|
|
|
},
|
|
|
|
|
|
/**
|