feat: 个人中心优化tool方法

master
Yer 2023-09-28 17:22:19 +08:00
parent 1cc6cc4ac7
commit 1046a1052e
2 changed files with 23 additions and 5 deletions

View File

@ -123,11 +123,26 @@ export default {
}, },
methods: { methods: {
navigateTo(url) { handleNavigate(url) {
uni.navigateTo({ uni.navigateTo({
url, url,
}); });
}, },
navigateTo(url) {
const ignores = [
'/pages/mine/set/setUp',
'/pages/mine/set/editionIntro',
'/pages/mine/set/feedBack'
]
if (!ignores.includes(url)) {
if (this.$options.filters.tipsToLogin('normal')) {
this.handleNavigate(url)
}
}
else {
this.handleNavigate(url)
}
},
linkMsgDetail(){ linkMsgDetail(){
uni.navigateTo({ uni.navigateTo({

View File

@ -376,7 +376,7 @@ export function talkIm (storeId, goodsId, id) {
} }
} }
export function tipsToLogin () { export function tipsToLogin (type) {
if (!isLogin("auth")) { if (!isLogin("auth")) {
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
@ -388,8 +388,11 @@ export function tipsToLogin () {
if (res.confirm) { if (res.confirm) {
navigateToLogin(); navigateToLogin();
} else if (res.cancel) { } else if (res.cancel) {
if(type !== 'normal'){
uni.navigateBack(); uni.navigateBack();
} }
}
}, },
}); });
return false; return false;