fix: 未登录支付按钮改登录

This commit is contained in:
Gsh
2025-09-03 11:43:40 +08:00
parent a61286e534
commit 6e2dd39246
3 changed files with 17 additions and 14 deletions

View File

@@ -403,7 +403,7 @@ function openContact() {
position: fixed;
top: 0;
left: 0;
z-index: 2000;
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;

View File

@@ -4,7 +4,6 @@ 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';
@@ -27,7 +26,6 @@ const packagesData = {
],
};
const userStore = useUserStore();
const isLoginDialogVisible = computed(() => userStore.isLoginDialogVisible);
const visible = ref(true);
const activeTab = ref('member');
@@ -250,9 +248,6 @@ function onClose() {
</script>
<template>
<!-- 登录弹框 -->
<LoginDialog v-model:visible="isLoginDialogVisible" />
<el-dialog
v-model="visible" :width="isMobile ? '90%' : '980px'" :fullscreen="isMobile && showDetails"
:show-close="false" destroy-on-close class="product-package-dialog" @close="onClose"
@@ -410,11 +405,19 @@ function onClose() {
了解更多
</el-button>
<el-button
v-if="userStore.userInfo"
type="primary" :disabled="!selectedId || isLoading" :loading="isLoading" class="pay-button"
@click="pay"
>
立即支付
</el-button>
<el-button
v-else
type="primary" class="pay-button"
@click="handleClickLogin"
>
立即登录/注册
</el-button>
</div>
<div class="note-text">
@@ -490,11 +493,19 @@ function onClose() {
了解更多
</el-button>
<el-button
v-if="userStore.userInfo"
type="primary" size="large" :disabled="!selectedId || isLoading" :loading="isLoading"
class="pay-button" @click="pay"
>
立即支付
</el-button>
<el-button
v-else
type="primary" size="large"
class="pay-button" @click="handleClickLogin"
>
立即登录/注册
</el-button>
</div>
</div>

View File

@@ -11,14 +11,6 @@ declare module 'vue' {
AccountPassword: typeof import('./../src/components/LoginDialog/components/FormLogin/AccountPassword.vue')['default']
APIKeyManagement: typeof import('./../src/components/userPersonalCenter/components/APIKeyManagement.vue')['default']
DeepThinking: typeof import('./../src/components/DeepThinking/index.vue')['default']
ElAlert: typeof import('element-plus/es')['ElAlert']
ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElCollapse: typeof import('element-plus/es')['ElCollapse']
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElImage: typeof import('element-plus/es')['ElImage']
FilesSelect: typeof import('./../src/components/FilesSelect/index.vue')['default']
IconSelect: typeof import('./../src/components/IconSelect/index.vue')['default']
Indexl: typeof import('./../src/components/SupportModelProducts/indexl.vue')['default']