游客模式
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<view class="footer_box" :class="{ footer_bg: bg }">
|
||||
<view v-for="(item, index) of navigationList" :key="index" class="footer_item">
|
||||
<view class="footer_nav_item" @click="onPageJump(item.pagePath)">
|
||||
<view class="footer_nav_item" @click="onPageJump(item.pagePath,index+1)">
|
||||
<image v-if="item.pagePath == path" class="footer_nav_item_image footer_nav_item_image_scale"
|
||||
:src="'/' + item.selectedIconPath" mode="aspectFit"></image>
|
||||
<image v-else class="footer_nav_item_image" :src="'/' + item.iconPath" mode="aspectFit"></image>
|
||||
@@ -49,7 +49,7 @@
|
||||
iconPath: 'static/tab/icon2_n.png',
|
||||
selectedIconPath: 'static/tab/icon2_y.png',
|
||||
text: '我的订单'
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
pagePath: 'pages/peanut/mine',
|
||||
@@ -69,11 +69,23 @@
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
onPageJump(url) {
|
||||
if (this.path !== url) {
|
||||
uni.switchTab({
|
||||
url: '/' + url
|
||||
});
|
||||
onPageJump(url,num) {
|
||||
if (uni.getStorageSync("anonymous") == '0000000000' && (num == 2 || num == 3)) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先登录'
|
||||
})
|
||||
// setTimeout(() => {
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/user/login"
|
||||
// });
|
||||
// }, 1000)
|
||||
} else {
|
||||
if (this.path !== url) {
|
||||
uni.switchTab({
|
||||
url: '/' + url
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -159,10 +171,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.footer_item_text_active {
|
||||
color: #079307;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user