Commit dbb509cf by 姜雷

修改权限层级

parent 836c791f
......@@ -82,7 +82,9 @@ Page({
} = res;
app.globalData.token = token;
app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles;
app.globalData.userRoles = userRoles.length
? userRoles[0].childs
: [];
wx.hideLoading();
wx.redirectTo({
url: '/pages/homeAndReport/homeAndReport',
......@@ -162,7 +164,9 @@ Page({
} = res;
app.globalData.token = token;
app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles;
app.globalData.userRoles = userRoles.length
? userRoles[0].childs
: [];
try {
wx.setStorageSync('token', token);
} catch (error) {}
......@@ -215,7 +219,9 @@ Page({
} = res;
app.globalData.token = token;
app.globalData.userInfo = userInfo;
app.globalData.userRoles = userRoles;
app.globalData.userRoles = userRoles.length
? userRoles[0].childs
: [];
try {
wx.setStorageSync('token', token);
} 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