|
@@ -409,7 +409,7 @@ async function handleLogin1(data) {
|
|
|
uni.removeStorageSync('accountnoPwd');
|
|
uni.removeStorageSync('accountnoPwd');
|
|
|
uni.setStorageSync('accountnoPwd', '');
|
|
uni.setStorageSync('accountnoPwd', '');
|
|
|
}
|
|
}
|
|
|
- let auth = uni.getStorageSync("userAuth");
|
|
|
|
|
|
|
+ let auth = false && uni.getStorageSync("userAuth");
|
|
|
if (auth) {
|
|
if (auth) {
|
|
|
console.log("使用缓存权限")
|
|
console.log("使用缓存权限")
|
|
|
$Http.basic({
|
|
$Http.basic({
|
|
@@ -462,16 +462,19 @@ async function handleLogin1(data) {
|
|
|
} else {
|
|
} else {
|
|
|
uni.removeStorageSync('isAdmin');
|
|
uni.removeStorageSync('isAdmin');
|
|
|
uni.removeStorageSync('isViewSkus');
|
|
uni.removeStorageSync('isViewSkus');
|
|
|
|
|
+ uni.removeStorageSync('isWork');
|
|
|
uni.removeStorageSync('userAuth');
|
|
uni.removeStorageSync('userAuth');
|
|
|
uni.setStorageSync('userAuth', res.data)
|
|
uni.setStorageSync('userAuth', res.data)
|
|
|
try {
|
|
try {
|
|
|
let app = res.data.find(v => v.system == "service").modules.find(v => v.systemmodule == "wserve").apps.find(v => v.name == "wxchatserve").meta.auth.map(v => v.option);
|
|
let app = res.data.find(v => v.system == "service").modules.find(v => v.systemmodule == "wserve").apps.find(v => v.name == "wxchatserve").meta.auth.map(v => v.option);
|
|
|
uni.setStorageSync('isAdmin', app.includes('admin'));
|
|
uni.setStorageSync('isAdmin', app.includes('admin'));
|
|
|
uni.setStorageSync('isViewSkus', app.includes('skus'));
|
|
uni.setStorageSync('isViewSkus', app.includes('skus'));
|
|
|
|
|
+ uni.setStorageSync('isWork', app.includes('work'));
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
console.log(error)
|
|
|
uni.setStorageSync('isAdmin', false);
|
|
uni.setStorageSync('isAdmin', false);
|
|
|
uni.setStorageSync('isViewSkus', false);
|
|
uni.setStorageSync('isViewSkus', false);
|
|
|
|
|
+ uni.setStorageSync('isWork', false);
|
|
|
}
|
|
}
|
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/index',
|
|
url: '/pages/index/index',
|