修复路由bug
This commit is contained in:
parent
effded7ac0
commit
cc827a5c09
@ -9,8 +9,8 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view class="my_info flex_a_c">
|
<view class="my_info flex_a_c">
|
||||||
<view class="">
|
<view class="">
|
||||||
<u--image :showLoading="true" :src="myOaInfo.avatar||'../../static/img/public/avatar.png'"
|
<u--image :showLoading="true" :src="myOaInfo.avatar||'../../static/img/public/avatar.png'" width="130.28rpx"
|
||||||
width="130.28rpx" height="130.28rpx" shape="circle"></u--image>
|
height="130.28rpx" shape="circle"></u--image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!$store.state.app.token" @click="login" class="mesg_box">
|
<view v-if="!$store.state.app.token" @click="login" class="mesg_box">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
@ -49,8 +49,7 @@
|
|||||||
<view class="backlog" :class="!ApproveList.length>0?'backlog_no_data':''">
|
<view class="backlog" :class="!ApproveList.length>0?'backlog_no_data':''">
|
||||||
<view class="head_title flex_a_c_j_sb">
|
<view class="head_title flex_a_c_j_sb">
|
||||||
<view class="title">公告列表</view>
|
<view class="title">公告列表</view>
|
||||||
<view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')">更多 <view
|
<view class="flex_a_c" @click="navTo('/subpkg/noticeList/noticeList')">更多 <view class="iconfont icon-you">
|
||||||
class="iconfont icon-you">
|
|
||||||
<uni-icons type="forward"></uni-icons>
|
<uni-icons type="forward"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -7,10 +7,15 @@ const whiteList = ['/','/pages/oaHome/oaHome', '/pages/oaExamine/oaExamine', '/p
|
|||||||
]
|
]
|
||||||
|
|
||||||
const hasPermission = (url) => {
|
const hasPermission = (url) => {
|
||||||
if (whiteList.indexOf(url) !== -1 || uni.getStorageSync("TOKEN")) {
|
try{
|
||||||
|
if (whiteList.indexOf(url) !== -1 || whiteList.indexOf(url.split('?')[0]) || uni.getStorageSync("TOKEN")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
}catch(e){
|
||||||
|
console.log(e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const initRouter = () => {
|
const initRouter = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user