From 52311fae0a9c6e0537cdcdce0025ba19505d3191 Mon Sep 17 00:00:00 2001 From: sexygoat <1538832180@qq.com> Date: Mon, 11 May 2026 15:14:38 +0800 Subject: [PATCH] fix: bug --- README-AGENT-SYSTEM.md | 9 +- env/.env | 2 +- env/.env.test | 2 +- .../design.md | 51 + .../proposal.md | 25 + .../specs/design-theme-tokens/spec.md | 41 + .../tasks.md | 12 + .../design.md | 57 + .../proposal.md | 28 + .../specs/agent-fund-summary/spec.md | 76 + .../tasks.md | 15 + src/api/commission.ts | 6 +- src/components/AgentFundSummaryCard.vue | 88 + src/pages/agent-system/asset-search/index.vue | 8 - .../agent-system/commission-center/index.vue | 42 +- src/pages/agent-system/home/index.vue | 128 +- src/pages/agent-system/index.vue | 1512 ----------------- src/pages/agent-system/withdraw/index.vue | 28 +- src/static/styles/theme.scss | 135 +- src/uni.scss | 24 +- types/components.d.ts | 1 + uno.config.ts | 30 +- 22 files changed, 547 insertions(+), 1773 deletions(-) create mode 100644 openspec/changes/update-agent-index-layout-and-theme-tokens/design.md create mode 100644 openspec/changes/update-agent-index-layout-and-theme-tokens/proposal.md create mode 100644 openspec/changes/update-agent-index-layout-and-theme-tokens/specs/design-theme-tokens/spec.md create mode 100644 openspec/changes/update-agent-index-layout-and-theme-tokens/tasks.md create mode 100644 openspec/changes/update-fund-summary-username-filter-and-main-balance-display/design.md create mode 100644 openspec/changes/update-fund-summary-username-filter-and-main-balance-display/proposal.md create mode 100644 openspec/changes/update-fund-summary-username-filter-and-main-balance-display/specs/agent-fund-summary/spec.md create mode 100644 openspec/changes/update-fund-summary-username-filter-and-main-balance-display/tasks.md create mode 100644 src/components/AgentFundSummaryCard.vue delete mode 100644 src/pages/agent-system/index.vue diff --git a/README-AGENT-SYSTEM.md b/README-AGENT-SYSTEM.md index 2a0c89c..c90d9d5 100644 --- a/README-AGENT-SYSTEM.md +++ b/README-AGENT-SYSTEM.md @@ -24,7 +24,7 @@ pnpm dev:h5 http://localhost:5173/ ``` -**默认入口页面**: `pages/agent-system/index` +**默认入口页面**: `pages/agent-system/home/index` --- @@ -85,7 +85,10 @@ http://localhost:5173/ ``` src/pages/agent-system/ -└── index.vue # 主页面 (所有功能都在这里) +├── home/index.vue # 当前首页入口 +├── commission-center/index.vue # 佣金中心 +├── withdraw/index.vue # 提现管理 +└── ... # 其他独立业务页面 .claude/ ├── AGENT-SYSTEM-DESIGN.md # 完整设计规范 (50+ 页) @@ -135,7 +138,7 @@ src/pages/agent-system/ ### 添加新菜单项 -修改 `src/pages/agent-system/index.vue`: +当前实现已拆分为多页面,请修改对应业务页,例如 `src/pages/agent-system/home/index.vue`: ```vue + + diff --git a/src/pages/agent-system/asset-search/index.vue b/src/pages/agent-system/asset-search/index.vue index 28df4cb..5df940f 100644 --- a/src/pages/agent-system/asset-search/index.vue +++ b/src/pages/agent-system/asset-search/index.vue @@ -340,14 +340,6 @@ - - - 运营商ID - - {{ cardInfo.carrier_id }} - - - 卡类型 diff --git a/src/pages/agent-system/commission-center/index.vue b/src/pages/agent-system/commission-center/index.vue index b8c1f8d..fcac6f9 100644 --- a/src/pages/agent-system/commission-center/index.vue +++ b/src/pages/agent-system/commission-center/index.vue @@ -2,6 +2,7 @@ import { ref, computed, onMounted } from 'vue' import { getFundSummary, getCommissionRecords, getCommissionStats } from '@/api/commission' import type { FundSummary, CommissionRecord, CommissionStats } from '@/api/commission' +import AgentFundSummaryCard from '@/components/AgentFundSummaryCard.vue' import SimplePicker from '@/components/SimplePicker.vue' type LoginUserInfo = { @@ -13,7 +14,6 @@ const commissionSummary = ref(null) const shopId = ref(0) const commissionRecords = ref([]) const commissionStats = ref(null) -const loading = ref(false) const loadingRecords = ref(false) const page = ref(1) const pageSize = 20 @@ -86,7 +86,7 @@ onMounted(() => { async function loadCommissionSummary() { try { const userInfo = getLoginUserInfo() - commissionSummary.value = await getFundSummary(userInfo?.username ? { shop_name: userInfo.username } : undefined) + commissionSummary.value = await getFundSummary(userInfo?.username ? { username: userInfo.username } : undefined) } catch (error) { console.error('加载佣金概览失败:', error) } @@ -153,12 +153,6 @@ function loadMore() { } } -function onScroll(e: any) { - const { scrollTop, scrollHeight, clientHeight } = e.target - if (scrollHeight - scrollTop - clientHeight < 100) { - loadMore() - } -}