修复跳转问题
This commit is contained in:
@ -69,14 +69,23 @@ export default {
|
||||
let redirect = cookie.get('redirect').replace(/\ /g, '')
|
||||
cookie.remove('redirect')
|
||||
if (redirect && redirect.indexOf('/pages') != -1) {
|
||||
uni.showToast({
|
||||
title: '/pages' + redirect.split('/pages')[1],
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
this.$yrouter.replace({
|
||||
path: '/pages' + redirect.split('/pages')[1],
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: '/pages' + redirect.split('/pages')[1],
|
||||
// icon: 'none',
|
||||
// duration: 2000,
|
||||
// })
|
||||
//此处跳转tab 得判断
|
||||
let pathUrl = '/pages' + redirect.split('/pages')[1]
|
||||
if(pathUrl == '/pages/home/index' || pathUrl == '/pages/shop/GoodsClass/index' || pathUrl == '/pages/shop/ShoppingCart/index' || pathUrl == '/pages/user/User/index'){
|
||||
this.$yrouter.switchTab({
|
||||
path: pathUrl,
|
||||
})
|
||||
}else{
|
||||
this.$yrouter.replace({
|
||||
path: pathUrl,
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$yrouter.switchTab({
|
||||
path: '/pages/home/index',
|
||||
|
Reference in New Issue
Block a user