From a490254abd7c4c9168524fcd6bb1a8db79fff48b Mon Sep 17 00:00:00 2001
From: Mrx <18278715334@163.com>
Date: Mon, 9 Feb 2026 12:46:04 +0800
Subject: [PATCH] f login logic
---
src/components/InquireForm.vue | 24 +++----------
src/views/Inquire.vue | 62 +++-------------------------------
2 files changed, 8 insertions(+), 78 deletions(-)
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