优化小程序登录跳转部分代码.新增全局条件编译跳转方法

This commit is contained in:
lemon橪
2021-08-17 11:53:56 +08:00
parent 3d1e175194
commit d76bab4b71
12 changed files with 68 additions and 41 deletions

View File

@@ -81,6 +81,7 @@ export default {
* 进入页面检测当前账户是否登录
*/
onShow() {
let that = this
if (this.$options.filters.isLogin("auth")) {
this.getAddressList();
} else {
@@ -90,9 +91,7 @@ export default {
confirmColor: this.$lightColor,
success: function (res) {
if (res.confirm) {
uni.navigateTo({
url: "/pages/passport/login",
});
that.$options.filters.navigateToLogin();
} else if (res.cancel) {
uni.navigateBack();
}