From a61286e534dd5ad1dfadb91811e02216aa5b91e6 Mon Sep 17 00:00:00 2001 From: Gsh <15170702455@163.com> Date: Wed, 3 Sep 2025 10:56:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=9D=9E=E4=BC=9A=E5=91=98=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E9=80=89=E6=8B=A9=E8=B7=B3=E8=BD=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Ai.Vue3/.eslintrc-auto-import.json | 2 - .../src/components/ModelSelect/index.vue | 15 +- .../src/components/ProductPackage/index.vue | 164 ++++++++++-------- Yi.Ai.Vue3/types/components.d.ts | 43 +++++ 4 files changed, 148 insertions(+), 76 deletions(-) diff --git a/Yi.Ai.Vue3/.eslintrc-auto-import.json b/Yi.Ai.Vue3/.eslintrc-auto-import.json index 313e6711..af1083b7 100644 --- a/Yi.Ai.Vue3/.eslintrc-auto-import.json +++ b/Yi.Ai.Vue3/.eslintrc-auto-import.json @@ -5,8 +5,6 @@ "ComputedRef": true, "DirectiveBinding": true, "EffectScope": true, - "ElMessage": true, - "ElMessageBox": true, "ExtractDefaultPropTypes": true, "ExtractPropTypes": true, "ExtractPublicPropTypes": true, diff --git a/Yi.Ai.Vue3/src/components/ModelSelect/index.vue b/Yi.Ai.Vue3/src/components/ModelSelect/index.vue index cde2a4b1..40effe3c 100644 --- a/Yi.Ai.Vue3/src/components/ModelSelect/index.vue +++ b/Yi.Ai.Vue3/src/components/ModelSelect/index.vue @@ -8,6 +8,7 @@ import Popover from '@/components/Popover/index.vue'; import SvgIcon from '@/components/SvgIcon/index.vue'; import { useUserStore } from '@/stores'; import { useModelStore } from '@/stores/modules/model'; +import { showProductPackage } from '@/utils/product-package.ts'; import { isUserVip } from '@/utils/user'; const router = useRouter(); @@ -72,13 +73,13 @@ function handleModelClick(item: GetSessionListVO) { ${ isUserVip() ? '
您可随时访问产品页面查看更多特权内容。
' - : '点击下方按钮,立即升级为 VIP 会员!
' + : '请点击右上角登录按钮,登录后进行购买!
' } `, isUserVip() ? '会员状态' : '会员尊享', { - confirmButtonText: '前往产品页面', + confirmButtonText: '产品查看', cancelButtonText: '关闭', dangerouslyUseHTMLString: true, type: 'info', @@ -87,10 +88,12 @@ function handleModelClick(item: GetSessionListVO) { }, ) .then(() => { - router.push({ - name: 'products', // 使用命名路由 - query: { from: isUserVip() ? 'vip' : 'user' }, // 可选:添加来源标识 - }); + showProductPackage(); + + // router.push({ + // name: 'products', // 使用命名路由 + // query: { from: isUserVip() ? 'vip' : 'user' }, // 可选:添加来源标识 + // }); }) .catch(() => { // 点击右上角关闭或“关闭”按钮,不执行任何操作 diff --git a/Yi.Ai.Vue3/src/components/ProductPackage/index.vue b/Yi.Ai.Vue3/src/components/ProductPackage/index.vue index ed7d0d1d..988be15a 100644 --- a/Yi.Ai.Vue3/src/components/ProductPackage/index.vue +++ b/Yi.Ai.Vue3/src/components/ProductPackage/index.vue @@ -4,8 +4,10 @@ import { ElMessage } from 'element-plus'; import { computed, onBeforeUnmount, onMounted, ref } from 'vue'; import { useRouter } from 'vue-router'; import { createOrder, getOrderStatus } from '@/api'; +import LoginDialog from '@/components/LoginDialog/index.vue'; import SupportModelList from '@/components/userPersonalCenter/components/SupportModelList.vue'; import ProductPage from '@/pages/products/index.vue'; +import { useUserStore } from '@/stores'; const emit = defineEmits(['close']); @@ -24,6 +26,8 @@ const packagesData = { { id: 9, name: '联系站长', desc: '', price: 0, tag: '企业级需求', discount: '' }, ], }; +const userStore = useUserStore(); +const isLoginDialogVisible = computed(() => userStore.isLoginDialogVisible); const visible = ref(true); const activeTab = ref('member'); @@ -123,6 +127,10 @@ function selectPackage(pkg: any) { selectPackageObject.value = pkg; } +function handleClickLogin() { + userStore.openLoginDialog(); +} + async function pay() { if (!selectedId.value) { ElMessage.warning('请选择一个套餐'); @@ -242,8 +250,13 @@ function onClose() { -充值后,加客服微信回复账号名,可专享vip售后服务
-客服微信号:chengzilaoge520 或扫描右侧二维码
-
+ 充值后,加客服微信回复账号名,可专享vip售后服务
++ 客服微信号:chengzilaoge520 或扫描右侧二维码 +
+
充值后,加客服微信回复账号名,可专享vip售后服务
-客服微信号:chengzilaoge520 或扫描右侧二维码
-
- + 客服微信号:chengzilaoge520 或扫描右侧二维码 +