diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..76631db --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,8 @@ +{ + "permissions": { + "allow": [ + "Skill(superpowers:subagent-driven-development)", + "Skill(superpowers:subagent-driven-development:*)" + ] + } +} diff --git a/docs/superpowers/plans/2026-05-14-activity-ranking-modal-implementation-plan.md b/docs/superpowers/plans/2026-05-14-activity-ranking-modal-implementation-plan.md new file mode 100644 index 0000000..c2e1edd --- /dev/null +++ b/docs/superpowers/plans/2026-05-14-activity-ranking-modal-implementation-plan.md @@ -0,0 +1,716 @@ +# ActivityRankingModal 实现计划 + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** 创建 `ActivityRankingModal.vue` 弹窗组件,从 `ThemeBanner` 点击触发,显示单活动的排名数据 + +**Architecture:** 复用 `RankingModal.vue` 的现有样式主题和数据转换逻辑,创建专用于活动排名的简化弹窗组件 + +**Tech Stack:** Vue 3 Composition API, uni-app, 复用现有 RankingModal/TOP3Card/RankingListItem 组件 + +--- + +## 文件结构 + +``` +frontend/pages/support-activity/ +├── components/ +│ ├── ActivityRankingModal.vue ← 新建 +│ ├── ThemeBanner.vue ← 修改:添加点击事件触发弹窗 +│ ├── TOP3Card.vue ← 复用(来自 pages/components/) +│ └── RankingListItem.vue ← 复用(来自 pages/components/) +└── index.vue ← 修改:引入并使用 ActivityRankingModal + +frontend/utils/api.js ← 无需修改(getActivityRankingApi 已存在) +docs/superpowers/specs/2026-05-14-activity-ranking-modal-design.md ← 已存在 +``` + +--- + +## 任务分解 + +### Task 1: 创建 ActivityRankingModal.vue 组件 + +**文件:** +- 创建: `frontend/pages/support-activity/components/ActivityRankingModal.vue` + +- [ ] **Step 1: 创建基础模板和样式结构** + +```vue + +``` + +- [ ] **Step 2: 实现 script 部分** + +```vue + +``` + +- [ ] **Step 3: 添加样式** + +```vue + +``` + +--- + +### Task 2: 修改 ThemeBanner.vue 添加点击事件 + +**文件:** +- 修改: `frontend/pages/support-activity/components/ThemeBanner.vue:1-36`(template 部分) + +- [ ] **Step 1: 在 banner-content 上添加点击事件** + +在 ` - - {{'用户 :'}} diff --git a/frontend/pages/support-activity/components/ActionBar.vue b/frontend/pages/support-activity/components/ActionBar.vue index 679de4a..be6e4c2 100644 --- a/frontend/pages/support-activity/components/ActionBar.vue +++ b/frontend/pages/support-activity/components/ActionBar.vue @@ -638,8 +638,16 @@ defineExpose({ display: flex; align-items: center; gap: 8rpx; - background: rgba(0, 0, 0, 0.2); + /* background: rgba(0, 0, 0, 0.2); */ padding: 8rpx 20rpx; + background: linear-gradient(to bottom right, + #F0E4B1 0%, + #F08399 50%, + #B94E73 100%); + border-radius: 24rpx; + box-shadow: + 0 4rpx 12rpx rgba(255, 143, 158, 0.2), + inset 0 2rpx 4rpx rgba(255, 255, 255, 0.4); border-radius: 30rpx; } @@ -715,7 +723,6 @@ defineExpose({ gap: 24rpx; padding-top: 24rpx; border-top: 1rpx solid rgba(255, 255, 255, 0.3); - margin-top: 16rpx; } .quantity-selector { diff --git a/frontend/pages/support-activity/components/ActivityRankingModal.vue b/frontend/pages/support-activity/components/ActivityRankingModal.vue index b014ce5..a3a1025 100644 --- a/frontend/pages/support-activity/components/ActivityRankingModal.vue +++ b/frontend/pages/support-activity/components/ActivityRankingModal.vue @@ -6,21 +6,21 @@ - + - - {{ activityTitle }} - + + + + @@ -42,11 +42,39 @@ - + + + + + + + + + + + + + + + + {{ user.nickname || '未知用户' }} + + + + + {{ formatPopularityScore(user.popularityScore) + }} + + + + 拜访 + + @@ -58,12 +86,33 @@ - + + + + {{ item.rank }} + + + + + {{ item.nickname || '未知用户' }} + + + + + + + {{ + formatPopularityScore(item.popularityScore) + }} + + + 拜访 + + + @@ -91,9 +140,9 @@ @@ -110,10 +159,8 @@