后台管理 登陆权限问题解决
This commit is contained in:
@@ -114,20 +114,16 @@ Page({
|
||||
let result = d.data;
|
||||
if (result.success) {
|
||||
// 登录成功
|
||||
if (result.data.userInfo.role != 2) {
|
||||
if ([3, 4, 5, 6].includes(result.data.userInfo.role)) {
|
||||
wx.showModal({
|
||||
title: '你不是社区居民',
|
||||
content: '请前往网页版登录',
|
||||
content: '管理员请前往网页版登录',
|
||||
showCancel: false,
|
||||
complete: (res) => {
|
||||
if (res.cancel) {
|
||||
|
||||
}
|
||||
|
||||
if (res.confirm) {
|
||||
|
||||
}
|
||||
//
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.setStorageSync("userInfo", result.data.userInfo);
|
||||
console.log("userInfo", wx.getStorageSync("userInfo"))
|
||||
|
Reference in New Issue
Block a user