diff --git a/src/components/InquireForm.vue b/src/components/InquireForm.vue index c013297..828c27c 100644 --- a/src/components/InquireForm.vue +++ b/src/components/InquireForm.vue @@ -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(); } }; diff --git a/src/views/Inquire.vue b/src/views/Inquire.vue index 8b354b1..cc2e018 100644 --- a/src/views/Inquire.vue +++ b/src/views/Inquire.vue @@ -1,59 +1,19 @@ \ No newline at end of file