Commit dbb509cf by 姜雷

修改权限层级

parent 836c791f
...@@ -82,7 +82,9 @@ Page({ ...@@ -82,7 +82,9 @@ Page({
} = res; } = res;
app.globalData.token = token; app.globalData.token = token;
app.globalData.userInfo = userInfo; app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles; app.globalData.userRoles = userRoles.length
? userRoles[0].childs
: [];
wx.hideLoading(); wx.hideLoading();
wx.redirectTo({ wx.redirectTo({
url: '/pages/homeAndReport/homeAndReport', url: '/pages/homeAndReport/homeAndReport',
...@@ -162,7 +164,9 @@ Page({ ...@@ -162,7 +164,9 @@ Page({
} = res; } = res;
app.globalData.token = token; app.globalData.token = token;
app.globalData.userInfo = userInfo; app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles; app.globalData.userRoles = userRoles.length
? userRoles[0].childs
: [];
try { try {
wx.setStorageSync('token', token); wx.setStorageSync('token', token);
} catch (error) {} } catch (error) {}
...@@ -215,7 +219,9 @@ Page({ ...@@ -215,7 +219,9 @@ Page({
} = res; } = res;
app.globalData.token = token; app.globalData.token = token;
app.globalData.userInfo = userInfo; app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles; app.globalData.userRoles = userRoles.length
? userRoles[0].childs
: [];
try { try {
wx.setStorageSync('token', token); wx.setStorageSync('token', token);
} catch (error) {} } catch (error) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment