fix(custom): 修复登录成功不跳转的问题
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-08-05 05:42:33 +08:00
parent d52bf0d1a5
commit a5703e5494
3 changed files with 27 additions and 26 deletions

View File

@@ -74,7 +74,7 @@ const login = async () => {
duration: 2000,
});
Taro.setStorageSync('token', res.data.token);
if (optData.value.isBack !== 'undefined') {
if (optData.value.isBack !== 'undefined' && optData.value.isBack) {
await getUserInfo();
Taro.navigateBack({
delta: 2,

View File

@@ -42,8 +42,9 @@ Taro.useLoad(opt => {
});
const getPhoneNumber = async (e: any) => {
// console.log(val.value);
if (!val.value) {
Taro.showToast({
return Taro.showToast({
title: '请先阅读并同意用户协议&隐私政策&积分使用规则',
icon: 'none',
});
@@ -76,7 +77,7 @@ const getPhoneNumber = async (e: any) => {
duration: 2000,
});
Taro.setStorageSync('token', ress.data.token);
if (optData.value.isBack !== 'undefined') {
if (optData.value.isBack !== 'undefined' && optData.value.isBack) {
await getUserInfo();
Taro.navigateBack({
delta: 1,