feat(fsgx): 完成全部24项开发任务 Phase1-7

Phase1 后端核心:
- 新增 fsgx_v1.sql 迁移脚本(is_queue_goods/frozen_points/available_points/no_assess)
- SystemConfigServices 返佣设置扩展(周期人数/分档比例/范围/时机)
- StoreOrderCreateServices 周期循环佣金计算
- StoreOrderTakeServices 佣金发放后同步冻结积分
- StoreProductServices/StoreProduct 保存 is_queue_goods

Phase2 后端接口:
- GET /api/hjf/brokerage/progress 佣金周期进度
- GET /api/hjf/assets/overview 资产总览
- HjfPointsServices 每日 frozen_points 0.4‰ 释放定时任务
- PUT /adminapi/hjf/member/{uid}/no_assess 不考核接口
- GET /adminapi/hjf/points/release_log 积分日志接口

Phase3 前端清理:
- hjfCustom.js 路由精简(仅保留 points/log)
- hjfQueue.js/hjfMember.js API 清理/重定向至 CRMEB 原生接口
- pages.json 公排→推荐佣金/佣金记录/佣金规则

Phase4-5 前端改造:
- queue/status.vue 推荐佣金进度页整体重写
- 商品详情/订单确认/支付结果页文案与逻辑改造
- 个人中心/资产页/引导页/规则页文案改造
- HjfQueueProgress/HjfRefundNotice/HjfAssetCard 组件改造
- 推广中心嵌入佣金进度摘要
- hjfMockData.js 全量更新(公排字段→佣金字段)

Phase6 Admin 增强:
- 用户列表新增 frozen_points/available_points 列及不考核操作按钮
- hjfPoints.js USE_MOCK=false 对接真实积分日志接口

Phase7 配置文档:
- docs/fsgx-phase7-config-checklist.md 后台配置与全链路验收清单

Made-with: Cursor
This commit is contained in:
apple
2026-03-23 22:32:19 +08:00
parent 788ee0c0c0
commit 434aa8c69d
13098 changed files with 2008990 additions and 961 deletions

View File

@@ -0,0 +1,8 @@
# Conversation - 2026-03-10 18:09:50
## Prompt
sonnet-4.6
## Response

View File

@@ -0,0 +1,49 @@
# Conversation - 2026-03-10 19:01:41
## Prompt
创建页面 user/index.vue改造 P1 个人中心):
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/user/index.vue
改造要求:
1. 使用 Vue 2 Options APIDIY架构
2. 导入 getMemberInfo from '@/api/hjfMember.js'
3. 导入 HjfMemberBadge 组件
4. data: memberInfo, loading
5. onShow: 每次显示时刷新会员信息
6. 模板改造: 在用户信息区域添加 HjfMemberBadge 展示会员等级
7. 样式: <style scoped lang="scss">
8. 参考: docs/frontend-new-pages-spec.md 第 5.1.1 节
完整 JSDoc。
## Response
All changes are in place and correct. Here's a summary of every modification made to `pages/user/index.vue`:
---
**改造完成,共 5 处变更:**
**1. 顶部 JSDoc 模块注释**(第 4354 行)
说明改造目的、参考规范章节5.1.1 / 6.1.7)。
**2. 新增 import**(第 8182 行)
```81:82:pro_v3.5.1/view/uniapp/pages/user/index.vue
import { getMemberInfo } from '@/api/hjfMember.js';
import HjfMemberBadge from '@/components/HjfMemberBadge.vue';
```
**3. 注册 `HjfMemberBadge` 组件 + data 新增 `memberInfo` / `loading`**(第 93、116126 行)
两个带 JSDoc 的响应式字段,结构对齐 `MOCK_MEMBER_INFO`。
**4. 模板 — 用户信息区添加徽章条**(第 512 行)
`v-if="!loading && isObjectData(memberInfo)"` 守卫,传入 `level`、`levelName`、`size="normal"`。
**5. `fetchMemberInfo()` 方法 + `onShow` 调用**(第 265、300318 行)
已登录时每次 `onShow` 触发刷新;`.finally()` 保证 `loading` 复位;带完整 JSDoc。
**6. 样式**(第 689707 行)
`<style scoped lang="scss">`;新增 `.hjf-member-badge-bar` 绝对定位徽章条;`.user-page` 加 `position: relative` 作为定位上下文。

View File

@@ -0,0 +1,33 @@
# Conversation - 2026-03-10 19:04:10
## Prompt
改造页面 goods_details/index.vue商品详情页
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/goods_details/index.vue
改造要求:
1. 使用 Vue 2 Options API
2. 在商品信息区域添加「报单商品」标签(当 is_queue_goods=1 时显示)
3. 如果是报单商品,在购买按钮区域显示「参与公排」提示
4. 参考: docs/frontend-new-pages-spec.md 第 5.1.2 节
只需添加报单商品相关的标签和提示,不需要大幅修改原有结构。完整 JSDoc。
## Response
Everything looks good. Here's a summary of the three changes made to `goods_details/index.vue`:
**1. 商品名称区「报单商品」标签**(第 162 行)
- 文本从 `公排商品` 修正为 `报单商品`(与需求一致)
- 依赖已有的 `isQueueGoods` computed 属性(`storeInfo.is_queue_goods == 1`
**2. 购买按钮上方「参与公排」提示条**(第 423427 行)
-`page_footer` 内、按钮行上方插入提示条
- 使用 `v-if="isQueueGoods"` 控制显示
- 提示文案:「报单商品 · 购买后自动参与公排,进四退一全额返还」
**3. 新增 CSS 样式**style 块末尾)
- `.brand-tag`:品牌角标(补充缺失的样式)
- `.queue-goods-tag`:绿色系内联标签,与品牌标签并列于商品名称左侧
- `.queue-goods-notice`:底部浅绿色提示条,带绿色图标和文字

View File

@@ -0,0 +1,43 @@
# Conversation - 2026-03-10 18:10:33
## Prompt
创建页面 queue/status.vue
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/queue/status.vue
内容要求:
1. 使用 Vue 2 Options API
2. 导入 getQueueStatus from '@/api/hjfQueue.js'
3. 导入组件 HjfQueueProgress, HjfRefundNotice
4. data: queueStatus, loading, showRefund, refundData
5. onLoad: 调用 getQueueStatus()
6. 模板: 公排进度 + 我的订单列表 + 退款弹窗
7. 样式: <style scoped lang="scss">
8. 参考: docs/frontend-new-pages-spec.md 第 2.3.1 节
完整 JSDoc。
## Response
文件已创建:`pages/queue/status.vue`
主要结构说明:
**模板3 个区块)**
- **顶部渐变卡片**:显示公排池总单数 + 嵌入 `HjfQueueProgress` 展示批次进度(复用 `user_money` 的渐变卡片模式)
- **我的排队列表**:遍历 `myOrders`,每条显示排队序号、订单号、金额(`¥3600.00`)、状态标签(`status=0` → 绿色"排队中"`status=1` → 灰色"已退款")、预计等待;含空状态 `emptyPage` 组件
- **退款弹窗**`HjfRefundNotice`,受 `showRefund` 控制
**data**
| 字段 | 类型 | 说明 |
|------|------|------|
| `queueStatus` | Object | API 返回的全量数据 |
| `loading` | Boolean | 加载状态 |
| `showRefund` | Boolean | 弹窗可见性 |
| `refundData` | Object | 弹窗所需 amount / orderId |
**onLoad** → 调用 `loadQueueStatus()``getQueueStatus()``detectNewRefund()` 在检测到页面参数 `show_refund=1` 时自动弹出最新退款通知。
所有 public method 均附有完整 JSDoc样式使用 `<style scoped lang="scss">` + `rpx` 单位 + `var(--view-theme)` / `var(--view-gradient)` 主题变量。

View File

@@ -0,0 +1,40 @@
# Conversation - 2026-03-10 19:17:31
## Prompt
改造页面 users/user_cash/index.vue提现页
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/users/user_cash/index.vue
改造要求:
1. 使用 Vue 2 Options API
2. 导入 getWithdrawInfo from '@/api/hjfAssets.js'
3. 在提现表单区域显示手续费率说明7%
4. data: 新增 withdrawInfo 字段
5. onLoad: 加载提现配置信息
6. 模板: 在提现金额输入区域显示实际到账金额扣除7%手续费)
7. 参考: docs/frontend-new-pages-spec.md 第 5.1.6 节
完整 JSDoc。
## Response
All 4 tabs have the fee breakdown block and the style is defined once. The changes are complete. Here's a summary of everything that was done:
**Changes made to `users/user_cash/index.vue`:**
1. **Import** — Added `import { getWithdrawInfo } from '@/api/hjfAssets.js'`
2. **`data()`** — Added `withdrawInfo: {}` field with JSDoc type annotation
3. **`computed`** — Added two new computed properties:
- `feeAmount()` — calculates `floor(amount × fee_rate) / 100`, formatted to 2 decimal places
- `actualAmount()` — calculates `amount - feeAmount`, formatted to 2 decimal places
4. **`onLoad`** — Added `this.loadWithdrawInfo()` call alongside existing init calls
5. **`methods`** — Added `loadWithdrawInfo()` with full JSDoc: calls `getWithdrawInfo()`, stores result in `withdrawInfo`, and syncs `withdraw_fee` from the API's `fee_rate` field (7% default)
6. **Template** — Replaced the old plain `提现手续费: X%,实际到账: ¥Y` tip in all 4 tabs with a new `.fee-breakdown` block showing `手续费7%¥XX.XX | 实际到账¥XX.XX` using the computed properties. The balance tab (currentTab=1) which previously had no fee display now also shows it. The hardcoded `7%` in the `tip-warning` block is now driven by `{{withdraw_fee}}` dynamically.
7. **Styles** — Added `.fee-breakdown` CSS class: green background (`#F0F9EB`), rate in red, separator in gray, amounts in theme color.

View File

@@ -0,0 +1,47 @@
# Conversation - 2026-03-10 19:05:43
## Prompt
改造页面 order_addcart/index.vue订单确认页
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/order_addcart/index.vue
改造要求:
1. 使用 Vue 2 Options API
2. 如果商品是报单商品is_queue_goods=1显示公排提示信息
3. 显示预计退款时间购买后第N个批次
4. 参考: docs/frontend-new-pages-spec.md 第 5.1.3 节
只需添加报单商品相关的提示信息。完整 JSDoc。
## Response
All changes are clean. Here's a summary of what was done to `pages/goods/order_confirm/index.vue`:
**Note:** The file specified in the task (`order_addcart/index.vue`) doesn't exist — the actual order confirmation page is `pages/goods/order_confirm/index.vue`, which is where the cart routes to (`/pages/goods/order_confirm/index`).
---
### Changes made
**1. Import** (line 653)
Added `import { getQueueStatus } from '@/api/hjfQueue.js'` to load the public queue status.
**2. `data()`** — added `queueStatus: null` to hold the queue progress snapshot fetched from the API.
**3. Three computed properties:**
- `isQueueOrder` — returns `true` if any item in `cartInfo` has `is_queue_goods == 1`
- `queueSplitCount` — sums up total qty of queue goods (each unit becomes an independent queue order)
- `estimatedRefundBatch` — estimates the batch number when refund will trigger based on current queue progress
**4. `onShow()`** — calls `this.loadQueueStatus()` on page show (only when logged in and not in gift-receive mode)
**5. `loadQueueStatus()` method** — fetches queue progress via `getQueueStatus()`, writes to `queueStatus`; fails silently so it never blocks checkout
**6. Template** — inserted a `.hjf-queue-notice` card inside the goods card, conditionally rendered via `v-if="isQueueOrder"`, showing:
- Split-order tip: "将拆分为 N 个独立公排订单" (only when qty > 1)
- Rule summary: "进四退一全额返还"
- Estimated refund batch: "购买后第 N 个批次"
- Link to queue status page
**7. SCSS**`.hjf-queue-notice` green-tinted info box with BEM sub-classes, using `var(--view-theme)` for the link color

View File

@@ -0,0 +1,9 @@
# Conversation - 2026-03-10 18:09:24
## Prompt
输出 'hello world'
## Response
hello world

View File

@@ -0,0 +1,38 @@
# Conversation - 2026-03-10 19:08:14
## Prompt
改造页面 users/user_money/index.vue我的余额页
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/users/user_money/index.vue
改造要求:
1. 使用 Vue 2 Options API
2. 在现有余额展示基础上,添加公排累计退款金额展示
3. 导入 getQueueStatus from '@/api/hjfQueue.js'
4. data: 新增 queueRefundedTotal 字段
5. onShow: 加载公排退款数据
6. 参考: docs/frontend-new-pages-spec.md 第 5.1.4 节
完整 JSDoc。
## Response
Everything looks correct. Here's a summary of all changes made:
**`pages/users/user_money/index.vue` 改造内容:**
1. **Import** — 在现有 imports 后新增:
```136:136:pro_v3.5.1/view/uniapp/pages/users/user_money/index.vue
import { getQueueStatus } from '@/api/hjfQueue.js';
```
2. **data** — 新增 `queueRefundedTotal` 字段(初始值 `0`),带完整 JSDoc 注释说明数据来源和类型。
3. **watch.isLogin** — 在登录成功回调中加入 `this.getQueueRefundedTotal()` 调用。
4. **onShow** — 登录态下同步调用 `this.getQueueRefundedTotal()`,每次页面展示都刷新退款数据。
5. **methods.getQueueRefundedTotal** — 新增方法,带完整 JSDoc`@see` 指向规范文档):调用 `getQueueStatus()`,过滤 `myOrders` 中 `status === 1` 的已退款订单,累加 `amount` 字段,保留两位小数赋给 `queueRefundedTotal`。
6. **template** — 在 `.cumulative` 区域(累计储值 / 累计消费 之后)新增第三列 `公排退款(元)` 统计项,与现有样式保持一致。

View File

@@ -0,0 +1,38 @@
# Conversation - 2026-03-10 18:15:31
## Prompt
创建页面 assets/index.vueP16 我的资产页):
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/assets/index.vue
内容要求:
1. 使用 Vue 2 Options API
2. 导入 getAssetsOverview from '@/api/hjfAssets.js'
3. 导入组件 HjfAssetCard, HjfMemberBadge
4. data: assetsInfo, loading
5. onLoad: 调用 getAssetsOverview()
6. 模板: 资产卡片 + 快捷操作入口(积分明细、现金明细、提现)
7. 样式: <style scoped lang="scss">
8. 参考: docs/frontend-new-pages-spec.md 第 3.3.1 节
完整 JSDoc。
## Response
文件已成功创建。以下是完整结构说明:
**`pages/assets/index.vue`** — P16 我的资产页
**模板结构:**
1. **顶部头部** — 页面标题 + `HjfMemberBadge`(会员等级徽章,右对齐)
2. **骨架屏**`loading` 为 true 时显示带 shimmer 动画的占位块
3. **`HjfAssetCard`** — 三栏渐变卡片(现金余额 / 待释放积分 / 已释放积分 + 今日释放脚注)
4. **汇总统计行** — 公排累计退款 + 累计获得积分(白色卡片,分割线隔开)
5. **快捷操作 2×2 网格** — 积分明细 / 现金明细 / 申请提现 / 公排记录,各带彩色圆形图标
**逻辑说明:**
- `onLoad` 调用 `fetchAssetsOverview()``getAssetsOverview()`Mock 数据即时可用)
- `assetsInfo` 存储完整响应数据;`loading` 控制骨架屏显隐
- `formattedTotalPoints` computed 属性千分位格式化
- 四个跳转方法分别导航到对应页面(`points_detail``user_bill``user_cash``queue/status`

View File

@@ -0,0 +1,40 @@
# Conversation - 2026-03-10 18:59:52
## Prompt
创建页面 guide/hjf_intro.vueP23 引导页):
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/guide/hjf_intro.vue
内容要求:
1. 使用 Vue 2 Options API
2. 导入 MOCK_GUIDE_DATA from '@/utils/hjfMockData.js'
3. data: slides, currentIndex
4. 模板: 引导页轮播图3张底部圆点指示器跳过按钮立即体验按钮
5. 跳过后记录已阅读状态到本地存储
6. 样式: <style scoped lang="scss">
7. 参考: docs/frontend-new-pages-spec.md 第 4.3.1 节
完整 JSDoc。
## Response
文件已完成。以下是实现要点:
**结构**
- `<swiper>` 承载 3 张幻灯片,每屏含图片 + 标题 + 描述
- 右上角"跳过"按钮(最后一屏自动隐藏)
- 底部:圆点指示器 + "下一步" / "立即体验"按钮
**数据**
- `slides``MOCK_GUIDE_DATA.slides` 初始化,`currentIndex` 追踪当前页
- `onSwiperChange` 同步指示器高亮
**已读状态**
- `markGuideRead()` 通过 `uni.setStorageSync('hjf_guide_read', '1')` 持久化
- 跳过(`handleSkip`)和完成(`handleStart`)均先写存储再 `reLaunch` 到首页
**样式**
- `<style scoped lang="scss">`,单位全部 rpx
- 活跃圆点使用 `var(--view-theme)` 主题色并拉伸为胶囊形状
- "立即体验"按钮应用主题渐变 + 阴影

View File

@@ -0,0 +1,8 @@
# Conversation - 2026-03-10 18:08:39
## Prompt
sonnet-4.6
## Response

View File

@@ -0,0 +1,33 @@
# Conversation - 2026-03-10 19:13:03
## Prompt
改造页面 users/user_bill/index.vue账单明细页
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/users/user_bill/index.vue
改造要求:
1. 使用 Vue 2 Options API
2. 添加公排退款类型筛选和展示
3. type=queue_refund 时显示公排退款标记
4. 参考: docs/frontend-new-pages-spec.md 第 5.1.5 节
完整 JSDoc。
## Response
改造完成。以下是本次修改的详细说明:
**新增内容**
1. **公排退款筛选 Tab** — 在导航栏新增第 4 个 Tab`type === "queue_refund"` 时高亮。`changeType` 方法支持字符串类型,并增加了相同类型不重复请求的短路判断。
2. **公排退款标记** — 列表条目中,当 `vo.type === 'queue_refund'` 时,在标题右侧渲染 `.queue-refund-tag` 胶囊标签(绿色主题色背景),直观区分该类账单。
3. **收入/支出颜色区分** — 新增 `.num-add`(主题色)/ `.num-sub`(深灰)两个样式类,正数金额用主题色高亮显示。
4. **完整 JSDoc** — 组件级注释说明页面用途和 type 枚举;所有 methods 均有参数/返回值文档;`data()` 每个字段都有 `@type` 标注。
**保留内容**
原有的分页逻辑(`page`/`limit`/`times` 分组去重)、`onReachBottom` 上拉加载、`emptyPage` 空状态、`colors` mixin、Vue 2 Options API 结构全部保留不变。

View File

@@ -0,0 +1,48 @@
# Conversation - 2026-03-10 19:20:13
## Prompt
改造页面 users/user_spread_money/index.vue推荐收益页
文件路径: /Users/apple/scott2026/huangjingfen/pro_v3.5.1/view/uniapp/pages/users/user_spread_money/index.vue
改造要求:
1. 使用 Vue 2 Options API
2. 导入 getTeamData, getTeamIncome from '@/api/hjfMember.js'
3. 在现有推荐收益基础上,添加团队收益统计(直推人数、伞下人数、团队订单数)
4. data: 新增 teamData, teamIncome 字段
5. onShow: 加载团队数据
6. 模板: 在收益列表上方添加团队统计卡片
7. 参考: docs/frontend-new-pages-spec.md 第 5.1.7 节
完整 JSDoc。
## Response
The file has been updated. Here's a summary of every change made:
**导入**
- 新增 `import { getTeamData, getTeamIncome } from '@/api/hjfMember.js'`
**data**
- 旧的 `teamStats`(直接拼接在 `spreadCount` 调用里)替换为两个独立字段:
- `teamData: { direct_count, umbrella_count, umbrella_orders }` — 对应 `MOCK_TEAM_DATA` 的字段
- `teamIncome: []` — 存储 `getTeamIncome` 返回的收益明细列表
**onShow**
- 每次页面显示时调用 `this.loadTeamData()`(在记录列表加载之前)
- 导航栏标题统一改为"推荐收益"(对应 spec 6.1.5 §1
**methods**
- 新增 `loadTeamData()`:并行调用 `getTeamData()``getTeamIncome()`,分别写入 `teamData``teamIncome`,带 `catch` 防止接口失败阻断页面
- 移除旧的 `getRecordListCount``getTeamStats`(已被 `loadTeamData` 整合)
- 全部方法补充 JSDoc 注释
**模板**
- 团队统计卡片改为读取 `teamData.direct_count``teamData.umbrella_count``teamData.umbrella_orders`(三栏:直推人数 / 伞下人数 / 团队订单数)
- 列表项积分数量展示:优先取 `item.points``MOCK_TEAM_INCOME` 字段),兼容旧字段 `item.number`,不带 ¥ 符号
- 新增积分来源标签(`直推奖励` / `伞下奖励`),通过 `item.type` 判断
**样式**
- 团队统计卡片使用绿色渐变背景,三栏等宽,分隔线半透明
- 新增 `.tag-direct` / `.tag-umbrella` 积分来源标签样式

View File

@@ -0,0 +1,8 @@
# Conversation - 2026-03-10 18:09:16
## Prompt
sonnet-4.6
## Response