修复路由bug

This commit is contained in:
weipengfei 2023-08-11 09:12:18 +08:00
parent effded7ac0
commit cc827a5c09
2 changed files with 598 additions and 594 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,10 +7,15 @@ const whiteList = ['/','/pages/oaHome/oaHome', '/pages/oaExamine/oaExamine', '/p
]
const hasPermission = (url) => {
if (whiteList.indexOf(url) !== -1 || uni.getStorageSync("TOKEN")) {
return true;
try{
if (whiteList.indexOf(url) !== -1 || whiteList.indexOf(url.split('?')[0]) || uni.getStorageSync("TOKEN")) {
return true;
}
return false;
}catch(e){
console.log(e);
return false;
}
return false;
}
const initRouter = () => {