feat: 新增拼团
This commit is contained in:
@@ -167,7 +167,11 @@ export default {
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if (options && options.redirect) {
|
||||
this.redirect = decodeURIComponent(options.redirect);
|
||||
console.log("登录后重定向目标页面:", this.redirect);
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
// 判断微信是否安装 (iOS 的 scheme 为 weixin://)
|
||||
this.isWechatInstalled = plus.runtime.isApplicationExist({
|
||||
@@ -201,18 +205,48 @@ export default {
|
||||
loading: false,
|
||||
showPolicyModal: false,
|
||||
isWechatInstalled: false,
|
||||
redirect: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onBack() {
|
||||
console.log('onBack',)
|
||||
uni.switchTab({
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
console.log('onBack')
|
||||
const pages = getCurrentPages();
|
||||
if (pages && pages.length > 1) {
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: '/pages/home/home'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
jumpAfterLogin() {
|
||||
if (this.redirect) {
|
||||
uni.redirectTo({
|
||||
url: this.redirect,
|
||||
fail: () => {
|
||||
uni.switchTab({
|
||||
url: this.redirect,
|
||||
fail: () => {
|
||||
uni.switchTab({ url: "/pages/home/home" });
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
} else {
|
||||
const pages = getCurrentPages();
|
||||
if (pages && pages.length > 1) {
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: "/pages/home/home",
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
jumpHome() {
|
||||
|
||||
uni.switchTab({
|
||||
url: "/pages/home/home",
|
||||
});
|
||||
@@ -271,8 +305,8 @@ export default {
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
then.jumpHome();
|
||||
}, 2000);
|
||||
then.jumpAfterLogin();
|
||||
}, 1500);
|
||||
},
|
||||
checkNameParam(val) {
|
||||
// console.log("val",val);
|
||||
@@ -647,9 +681,7 @@ export default {
|
||||
message: response.msg,
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: "/pages/home/home",
|
||||
});
|
||||
this.jumpAfterLogin();
|
||||
}, 1200);
|
||||
} else if (response && response.msg) {
|
||||
this.$refs.uToastRef.show({
|
||||
|
||||
Reference in New Issue
Block a user