From 0ec9fab7ff5206f214a8075b2f98e047d13b7a1d Mon Sep 17 00:00:00 2001 From: szz <961120009@qq.com> Date: Tue, 5 Aug 2025 15:25:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AgentDashboard.vue | 183 +--------------------------------- src/views/CustomerService.vue | 4 +- src/views/Matching.vue | 2 +- 3 files changed, 6 insertions(+), 183 deletions(-) diff --git a/src/views/AgentDashboard.vue b/src/views/AgentDashboard.vue index 0511e7c..87c9d75 100644 --- a/src/views/AgentDashboard.vue +++ b/src/views/AgentDashboard.vue @@ -7,7 +7,6 @@

{{ agentInfo?.real_name }} - {{ agentInfo?.city_name }}{{ agentInfo?.district_name }}代理

手机号:{{ agentInfo?.phone }}

-
- +
@@ -43,47 +42,6 @@
- - -
-
- -
-
-
{{ stats.used_codes || 0 }}
-
已使用二维码
-
有效:{{ stats.active_codes || 0 }}
-
-
-
- - -
- -
-
-

生成注册二维码

- - 生成新的邀请二维码 - -
- -
-
- 邀请二维码 -
- - 保存到手机 - -
-
-
- -

过期时间:{{ formatDate(currentInviteCode.expires_at) }}

-

商户扫描此二维码可直接进入注册页面

-
-
-
@@ -224,7 +182,7 @@ import { ref, reactive, onMounted } from 'vue' import { useRouter } from 'vue-router' import { ElMessage, ElMessageBox } from 'element-plus' -import { User, Money, Document } from '@element-plus/icons-vue' +import { User, Money } from '@element-plus/icons-vue' import api from '@/utils/api' const router = useRouter() @@ -233,8 +191,6 @@ const router = useRouter() const agentInfo = ref(null) const stats = ref({}) const activeTab = ref('merchants') -const generating = ref(false) -const currentInviteCode = ref(null) // 商户数据 const merchants = ref([]) @@ -313,58 +269,6 @@ const loadCommissions = async () => { } } -const generateInviteCode = async () => { - if (!agentInfo.value) return - - generating.value = true - try { - const { data } = await api.post('/agents/generate-invite-code', { - agent_id: agentInfo.value.id - }) - - currentInviteCode.value = data.data - ElMessage.success('二维码生成成功') - - // 刷新统计信息 - loadStats() - } catch (error) { - if (error.response?.data?.message) { - ElMessage.error(error.response.data.message) - } else { - ElMessage.error('生成二维码失败') - } - } finally { - generating.value = false - } -} - -/** - * 保存二维码图片到设备 - */ -const saveQRCode = () => { - if (!currentInviteCode.value?.qr_code) { - ElMessage.error('没有可保存的二维码') - return - } - - try { - // 创建一个临时的a标签用于下载 - const link = document.createElement('a') - link.href = currentInviteCode.value.qr_code - link.download = `注册二维码_${new Date().toISOString().slice(0, 10)}.png` - - // 触发下载 - document.body.appendChild(link) - link.click() - document.body.removeChild(link) - - ElMessage.success('二维码已保存到设备') - } catch (error) { - console.error('保存二维码失败:', error) - ElMessage.error('保存二维码失败') - } -} - const handleLogout = async () => { try { await ElMessageBox.confirm('确定要退出登录吗?', '确认退出', { @@ -416,10 +320,6 @@ const getCommissionStatusText = (status) => { return texts[status] || status } -const formatDate = (date) => { - return new Date(date).toLocaleDateString('zh-CN') -} - const formatDateTime = (date) => { return new Date(date).toLocaleString('zh-CN') } @@ -474,12 +374,11 @@ onMounted(() => { .stats-row { display: flex; gap: 12px; - margin-bottom: 12px; /* 与下方 "已使用二维码" 卡片间距 */ } /* 统计卡片通用样式 */ .stat-card { - flex: 1; /* 自动平分空间 */ + flex: 1; background: white; border-radius: 8px; padding: 16px; @@ -490,11 +389,6 @@ onMounted(() => { box-sizing: border-box; } -/* "已使用二维码" 单独一行 */ -.stat-card.single-stat { - width: 100%; /* 占满整行 */ -} - /* 图标样式 */ .stat-icon { width: 40px; @@ -514,9 +408,6 @@ onMounted(() => { .stat-icon.commission { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); } -.stat-icon.code { - background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); -} /* 文字样式 */ .stat-number { @@ -535,72 +426,6 @@ onMounted(() => { color: #909399; } -.function-area { - padding: 0 24px 24px; -} - -.function-card { - background: white; - border-radius: 8px; - padding: 24px; - box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); - width: 343px; -} - -.card-header { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 24px; -} - -.card-header h3 { - margin: 0; - font-size: 16px; - color: #303133; -} - -.invite-code-section { - display: flex; - gap: 24px; - align-items: center; -} - -.qr-code-container { - flex-shrink: 0; - display: flex; - flex-direction: column; - align-items: center; - gap: 12px; -} - -.qr-code { - width: 150px; - height: 150px; - border: 1px solid #e4e7ed; - border-radius: 8px; -} - -.qr-actions { - display: flex; - justify-content: center; -} - -.code-info { - flex: 1; -} - -.code-info p { - margin: 0 0 8px 0; - font-size: 14px; - color: #606266; -} - -.code-tip { - color: #909399 !important; - font-size: 12px !important; -} - .main-tabs { padding: 0 24px; } @@ -625,7 +450,7 @@ onMounted(() => { } :deep(.el-tabs__content) { - background: white; + background: #a9deffae; border-radius: 8px; padding: 24px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); diff --git a/src/views/CustomerService.vue b/src/views/CustomerService.vue index 675d439..4e4ecb7 100644 --- a/src/views/CustomerService.vue +++ b/src/views/CustomerService.vue @@ -8,9 +8,7 @@
客服码 -
扫码联系客服(长按可识别)
- 提示 -
点击关于我们,查看客服详情
+
扫码联系客服(长按识别)
diff --git a/src/views/Matching.vue b/src/views/Matching.vue index b2ede46..a19d1b8 100644 --- a/src/views/Matching.vue +++ b/src/views/Matching.vue @@ -635,7 +635,7 @@ export default { } else if (amount <= 15000) { return '分成3笔随机金额' } else { - return '随机分拆,每笔100-10000元' + return '随机分拆,每笔1000-8000元' } },