chore: 使用常量来处理会员中心的路由页面路径判断

This commit is contained in:
2026-01-07 15:09:49 +08:00
parent 6956841c8b
commit b10fcf02d4
27 changed files with 93 additions and 74 deletions

View File

@@ -234,13 +234,13 @@ export default {
this.$util.showToast({
title: this.$lang('loginSuccessTip')
});
let back = this.back ? this.back : '/pages/member/index';
let back = this.back ? this.back : this.$util.MEMBER_PAGE_URL;
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, 'reLaunch');
} else {
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
}
}
});
@@ -348,13 +348,13 @@ export default {
this.$store.dispatch('getCartNumber');
this.getMemberInfo(() => {
if (can_receive_registergift == 1) {
let back = this.back ? this.back : '/pages/member/index';
let back = this.back ? this.back : this.$util.MEMBER_PAGE_URL;
if (this.$refs.registerReward) this.$refs.registerReward.open(back);
} else {
if (this.back != '') {
this.$util.redirectTo(decodeURIComponent(this.back), {}, this.redirect);
} else {
this.$util.redirectTo('/pages/member/index', {}, this.redirect);
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, this.redirect);
}
}
})

View File

@@ -109,7 +109,7 @@
title: '未开启提现'
});
setTimeout(() => {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}, 1500);
}
}

View File

@@ -6,7 +6,7 @@
'height': menuButtonBounding.height + 'px'
}">
<view class="navbar-wrap">
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
<text class="iconfont icon-back_light back" @click="$util.redirectTo($util.MEMBER_PAGE_URL)"></text>
<view class="navbar-title">
账户余额
</view>
@@ -171,7 +171,7 @@ export default {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
return true;
},
watch: {

View File

@@ -43,7 +43,7 @@ export default {
});
},
toIndex() {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
},
apply() {
this.$util.redirectTo('/pages_tool/member/cancellation');

View File

@@ -77,7 +77,7 @@
});
},
back() {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
},
revoke() {
uni.showModal({
@@ -90,7 +90,7 @@
url: '/membercancel/api/membercancel/cancelApply',
success: res => {
if (res.code >= 0) {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
}
});

View File

@@ -183,7 +183,7 @@ export default {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
return true;
}
};
@@ -220,7 +220,7 @@ export default {
}
</style>
<style scoped>
<style lang="scss" scoped>
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important;
}

View File

@@ -418,7 +418,7 @@ export default {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
return true;
}
};

View File

@@ -96,7 +96,7 @@ export default {
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
}
});
@@ -118,7 +118,7 @@ export default {
this.$store.commit('setMemberInfo', '');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
} else {
this.$util.showToast({
title: rres.message

View File

@@ -354,7 +354,7 @@
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
return true;
},
watch: {

View File

@@ -54,7 +54,7 @@
}, 'redirectTo');
} else {
if (this.back) this.$util.redirectTo(this.back);
else this.$util.redirectTo('/pages/member/index');
else this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
}
});
@@ -133,7 +133,7 @@
setTimeout(() => {
if (this.back) this.$util.redirectTo(this.back, {},
'redirectTo');
else this.$util.redirectTo('/pages/member/index');
else this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}, 2000);
} else {
this.initInfo();

View File

@@ -7,7 +7,7 @@
}"
>
<view class="navbar-wrap">
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
<text class="iconfont icon-back_light back" @click="$util.redirectTo($util.MEMBER_PAGE_URL)"></text>
<view class="navbar-title">
我的积分
</view>
@@ -143,7 +143,7 @@ export default {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
return true;
},
watch: {

View File

@@ -256,7 +256,7 @@ export default {
this.$store.dispatch('emptyCart');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
} else {
this.$util.showToast({
title: rres.message
@@ -329,7 +329,7 @@ export default {
this.$store.dispatch('emptyCart');
this.$store.dispatch('emptyCart');
uni.removeStorageSync('authInfo');
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
}
});

View File

@@ -106,7 +106,7 @@ export default {
if (this.back != '') {
this.$util.redirectTo(this.back, {}, this.redirect);
} else {
this.$util.redirectTo('/pages/member/index');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
}
},
//获取rule

View File

@@ -91,7 +91,7 @@
this.$util.redirectTo('/pages_tool/member/coupon', {});
break;
default:
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL, {}, 'reLaunch');
break;
}
},