|
|
@@ -1,3 +1,5 @@
|
|
|
+const _Http = getApp().globalData.http;
|
|
|
+
|
|
|
function loginMsg(res) {
|
|
|
wx.setStorageSync('account_list', res.account_list)
|
|
|
if (res.account_list.length == 1) {
|
|
|
@@ -5,12 +7,29 @@ function loginMsg(res) {
|
|
|
wx.switchTab({
|
|
|
url: '/pages/tabbar/home/index'
|
|
|
})
|
|
|
+ query_userauth();
|
|
|
} else {
|
|
|
wx.redirectTo({
|
|
|
url: './selectSite',
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+/* 获取用户权限 */
|
|
|
+function query_userauth(i = 0) {
|
|
|
+ if (i == 5) return wx.showToast({
|
|
|
+ title: '权限查询失败,请稍后再试',
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "sysmanage.develop.userauth.userauth",
|
|
|
+ "method": "query_userauth",
|
|
|
+ content: {}
|
|
|
+ }).then(res => {
|
|
|
+ if (res.msg != '成功') return query_userauth(i + 1);
|
|
|
+ wx.setStorageSync('userauth', res.data);
|
|
|
+ })
|
|
|
+}
|
|
|
module.exports = {
|
|
|
- loginMsg
|
|
|
+ loginMsg,
|
|
|
+ query_userauth
|
|
|
}
|