|
|
@ -70,18 +70,19 @@ export default{ |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
$url(url, options = {}){ |
|
|
$url(url, options = {}){ |
|
|
// TODO 判断登录逻辑;防抖
|
|
|
|
|
|
if(options.type && options.type !== ''){ |
|
|
|
|
|
if(options.type === 'redirect'){ // 关闭当前,跳转
|
|
|
|
|
|
uni.redirectTo({ url }) |
|
|
|
|
|
}else if(options.type === 'switch'){ // 跳转
|
|
|
|
|
|
uni.switchTab({ url }) |
|
|
|
|
|
}else if(options.type === 'launch'){ // 关闭所有,跳转
|
|
|
|
|
|
uni.reLaunch({ url }) |
|
|
|
|
|
|
|
|
this.$u.throttle(() => { |
|
|
|
|
|
if(options.type && options.type !== ''){ |
|
|
|
|
|
if(options.type === 'redirect'){ // 关闭当前,跳转
|
|
|
|
|
|
uni.redirectTo({ url }) |
|
|
|
|
|
}else if(options.type === 'switch'){ // 跳转
|
|
|
|
|
|
uni.switchTab({ url }) |
|
|
|
|
|
}else if(options.type === 'launch'){ // 关闭所有,跳转
|
|
|
|
|
|
uni.reLaunch({ url }) |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
uni.navigateTo({ url }) // 跳转
|
|
|
} |
|
|
} |
|
|
}else{ |
|
|
|
|
|
uni.navigateTo({ url }) // 跳转
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, 100); |
|
|
}, |
|
|
}, |
|
|
$toBack(){ |
|
|
$toBack(){ |
|
|
let pages = getCurrentPages(); // 当前页
|
|
|
let pages = getCurrentPages(); // 当前页
|
|
|
|