1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

后台管理 登陆权限问题解决

This commit is contained in:
2023-03-28 14:01:13 +08:00
parent 614e04ed1b
commit 880e4f8941
13 changed files with 498 additions and 386 deletions

View File

@@ -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"))