f login logic
This commit is contained in:
@@ -132,7 +132,6 @@ import { useRoute, useRouter } from "vue-router";
|
||||
import { useUserStore } from "@/stores/userStore";
|
||||
import { useDialogStore } from "@/stores/dialogStore";
|
||||
import { useEnv } from "@/composables/useEnv";
|
||||
import { showConfirmDialog } from "vant";
|
||||
|
||||
import Payment from "@/components/Payment.vue";
|
||||
import BindPhoneOnlyDialog from "@/components/BindPhoneOnlyDialog.vue";
|
||||
@@ -320,26 +319,11 @@ function handleBindSuccess() {
|
||||
}
|
||||
}
|
||||
|
||||
// 处理输入框点击事件
|
||||
// 处理输入框点击事件(浏览/填写表单无需登录,仅付款时需要登录)
|
||||
const handleInputClick = async () => {
|
||||
if (!isLoggedIn.value) {
|
||||
if (!isWeChat.value && props.type !== 'promotion') {
|
||||
try {
|
||||
await showConfirmDialog({
|
||||
title: '提示',
|
||||
message: '您需要登录后才能进行查询,是否前往登录?',
|
||||
confirmButtonText: '前往登录',
|
||||
cancelButtonText: '取消',
|
||||
});
|
||||
router.push('/login');
|
||||
} catch {
|
||||
// 用户点击取消,什么都不做
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isWeChat.value && !userStore.mobile && props.type !== 'promotion') {
|
||||
dialogStore.openBindPhone();
|
||||
}
|
||||
// 已登录且在微信环境下未绑定手机号时,提示绑定
|
||||
if (isLoggedIn.value && isWeChat.value && !userStore.mobile && props.type !== 'promotion') {
|
||||
dialogStore.openBindPhone();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user