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

@@ -1,5 +1,5 @@
/**
* 黄精粉健康商城 - UniApp Mock 数据集中管理
* 范氏国香商城 - UniApp Mock 数据集中管理
* Phase 1 前端开发使用Phase 4 集成后可移除
*/
@@ -35,107 +35,30 @@ export function getCurrentScenario() {
return MOCK_SCENARIO;
}
// ========== 公排模块 ==========
// ========== 佣金进度模块(原公排模块 ==========
export const MOCK_QUEUE_STATUS = {
totalOrders: 156,
myOrders: [
{
id: 1,
order_id: 'HJF202603100001',
amount: 3600.00,
queue_no: 142,
status: 0,
refund_time: 0,
trigger_batch: 0,
add_time: 1741593600,
position: 14,
estimated_wait: '约3天'
},
{
id: 2,
order_id: 'HJF202603080002',
amount: 3600.00,
queue_no: 98,
status: 1,
refund_time: 1741507200,
trigger_batch: 24,
add_time: 1741420800,
position: 0,
estimated_wait: '已退款'
},
{
id: 3,
order_id: 'HJF202603070003',
amount: 3600.00,
queue_no: 85,
status: 0,
refund_time: 0,
trigger_batch: 0,
add_time: 1741334400,
position: 46,
estimated_wait: '约12天'
}
],
progress: {
current_batch_count: 2,
trigger_multiple: 4,
next_refund_queue_no: 39
}
export const MOCK_BROKERAGE_PROGRESS = {
cycle_total: 3,
cycle_current: 2,
cycle_rates: [20, 30, 50],
total_brokerage: '7200.00',
total_completed: 8
};
export const MOCK_QUEUE_HISTORY = {
list: [
{
id: 1,
order_id: 'HJF202603050001',
amount: 3600.00,
queue_no: 45,
status: 1,
refund_time: 1741334400,
trigger_batch: 11,
add_time: 1741161600,
time_key: '2026-03-07'
},
{
id: 2,
order_id: 'HJF202603060002',
amount: 3600.00,
queue_no: 67,
status: 0,
refund_time: 0,
trigger_batch: 0,
add_time: 1741248000,
time_key: '2026-03-06'
},
{
id: 3,
order_id: 'HJF202603040003',
amount: 3600.00,
queue_no: 33,
status: 1,
refund_time: 1741248000,
trigger_batch: 8,
add_time: 1741075200,
time_key: '2026-03-04'
}
],
count: 25,
page: 1,
limit: 15
};
// 兼容旧名称
export const MOCK_QUEUE_STATUS = MOCK_BROKERAGE_PROGRESS;
export const MOCK_QUEUE_HISTORY = { list: [], count: 0, page: 1, limit: 15 };
// ========== 资产模块 ==========
export const MOCK_ASSETS_OVERVIEW = {
brokerage_price: '7200.00',
now_money: '7200.00',
frozen_points: 15000,
available_points: 3200,
today_release: 6,
total_queue_refund: '14400.00',
total_points_earned: 18200,
member_level: 2,
member_level_name: '云店'
agent_level: 2,
agent_level_name: '云店'
};
export const MOCK_POINTS_DETAIL = {
@@ -200,11 +123,11 @@ export const MOCK_CASH_DETAIL = {
list: [
{
id: 1,
title: '公排退款 - 订单HJF202603050001',
amount: '3600.00',
title: '推荐佣金 - 订单FSGX202603050001',
amount: '1800.00',
pm: 1,
add_time: '2026-03-07 12:00',
order_id: 'HJF202603050001'
order_id: 'FSGX202603050001'
},
{
id: 2,
@@ -220,7 +143,7 @@ export const MOCK_CASH_DETAIL = {
amount: '299.00',
pm: 0,
add_time: '2026-03-05 09:20',
order_id: 'HJF202603050010'
order_id: 'FSGX202603050010'
}
],
count: 12,
@@ -229,6 +152,7 @@ export const MOCK_CASH_DETAIL = {
};
export const MOCK_WITHDRAW_INFO = {
brokerage_price: '7200.00',
now_money: '7200.00',
min_extract: 100,
fee_rate: 7,
@@ -335,18 +259,18 @@ export const MOCK_TEAM_INCOME = {
export const MOCK_GUIDE_DATA = {
slides: [
{
title: '欢迎来到黄精粉健康商城',
desc: '健康好物,品质生活',
title: '欢迎来到范氏国香商城',
desc: '优质国香,品质生活',
image: '/static/images/guide/slide1.png'
},
{
title: '公排返利机制',
desc: '购买报单商品自动进入公排每进4单退1单全额返还',
title: '推荐佣金机制',
desc: '购买报单商品,推荐好友购买可获得推荐佣金返现',
image: '/static/images/guide/slide2.png'
},
{
title: '会员积分体系',
desc: '推荐好友即获积分奖励,积分每日自动释放',
desc: '获得佣金同步获得待释放积分,积分每日自动释放',
image: '/static/images/guide/slide3.png'
}
]
@@ -359,29 +283,18 @@ export const MOCK_GUIDE_DATA = {
*/
const SCENARIO_A_DATA = {
queueStatus: {
totalOrders: 12,
myOrders: [],
progress: {
current_batch_count: 0,
trigger_multiple: 4,
next_refund_queue_no: 4
}
},
queueHistory: {
list: [],
count: 0,
page: 1,
limit: 15
cycle_total: 3, cycle_current: 0, cycle_rates: [20, 30, 50],
total_brokerage: '0.00', total_completed: 0
},
queueHistory: { list: [], count: 0, page: 1, limit: 15 },
assetsOverview: {
brokerage_price: '0.00',
now_money: '0.00',
frozen_points: 0,
available_points: 0,
today_release: 0,
total_queue_refund: '0.00',
total_points_earned: 0,
member_level: 0,
member_level_name: '普通会员'
agent_level: 0,
agent_level_name: '普通会员'
},
pointsDetail: {
list: [],
@@ -396,6 +309,7 @@ const SCENARIO_A_DATA = {
limit: 15
},
withdrawInfo: {
brokerage_price: '0.00',
now_money: '0.00',
min_extract: 100,
fee_rate: 7,
@@ -403,8 +317,8 @@ const SCENARIO_A_DATA = {
bank_list: []
},
memberInfo: {
member_level: 0,
member_level_name: '普通会员',
agent_level: 0,
agent_level_name: '普通会员',
direct_count: 0,
umbrella_count: 0,
umbrella_orders: 0,
@@ -429,10 +343,10 @@ const SCENARIO_A_DATA = {
};
/**
* 场景 B - 活跃用户(等待退款中)- 使用原有数据
* 场景 B - 活跃用户(佣金进行中)- 使用原有数据
*/
const SCENARIO_B_DATA = {
queueStatus: MOCK_QUEUE_STATUS,
queueStatus: MOCK_BROKERAGE_PROGRESS,
queueHistory: MOCK_QUEUE_HISTORY,
assetsOverview: MOCK_ASSETS_OVERVIEW,
pointsDetail: MOCK_POINTS_DETAIL,
@@ -444,116 +358,25 @@ const SCENARIO_B_DATA = {
};
/**
* 场景 C - VIP 用户(退款刚触发
* 场景 C - VIP 用户(周期佣金丰收
*/
const SCENARIO_C_DATA = {
queueStatus: {
totalOrders: 289,
myOrders: [
{
id: 10,
order_id: 'HJF202603110001',
amount: 3600.00,
queue_no: 285,
status: 1,
refund_time: Date.now() / 1000 - 120,
trigger_batch: 71,
add_time: Date.now() / 1000 - 86400 * 5,
position: 0,
estimated_wait: '已退款'
},
{
id: 9,
order_id: 'HJF202603090010',
amount: 3600.00,
queue_no: 268,
status: 0,
refund_time: 0,
trigger_batch: 0,
add_time: Date.now() / 1000 - 86400 * 2,
position: 8,
estimated_wait: '约2天'
},
{
id: 8,
order_id: 'HJF202603080008',
amount: 3600.00,
queue_no: 244,
status: 1,
refund_time: Date.now() / 1000 - 86400 * 3,
trigger_batch: 61,
add_time: Date.now() / 1000 - 86400 * 8,
position: 0,
estimated_wait: '已退款'
},
{
id: 7,
order_id: 'HJF202603050007',
amount: 3600.00,
queue_no: 196,
status: 1,
refund_time: Date.now() / 1000 - 86400 * 10,
trigger_batch: 49,
add_time: Date.now() / 1000 - 86400 * 15,
position: 0,
estimated_wait: '已退款'
}
],
progress: {
current_batch_count: 1,
trigger_multiple: 4,
next_refund_queue_no: 72
}
},
queueHistory: {
list: [
{
id: 10,
order_id: 'HJF202603110001',
amount: 3600.00,
queue_no: 285,
status: 1,
refund_time: Date.now() / 1000 - 120,
trigger_batch: 71,
add_time: Date.now() / 1000 - 86400 * 5,
time_key: '2026-03-11'
},
{
id: 9,
order_id: 'HJF202603090010',
amount: 3600.00,
queue_no: 268,
status: 0,
refund_time: 0,
trigger_batch: 0,
add_time: Date.now() / 1000 - 86400 * 2,
time_key: '2026-03-09'
},
{
id: 8,
order_id: 'HJF202603080008',
amount: 3600.00,
queue_no: 244,
status: 1,
refund_time: Date.now() / 1000 - 86400 * 3,
trigger_batch: 61,
add_time: Date.now() / 1000 - 86400 * 8,
time_key: '2026-03-08'
}
],
count: 4,
page: 1,
limit: 15
cycle_total: 3,
cycle_current: 1,
cycle_rates: [20, 30, 50],
total_brokerage: '25200.00',
total_completed: 25
},
queueHistory: { list: [], count: 0, page: 1, limit: 15 },
assetsOverview: {
brokerage_price: '25200.00',
now_money: '25200.00',
frozen_points: 38500,
available_points: 12600,
today_release: 15,
total_queue_refund: '50400.00',
total_points_earned: 51100,
member_level: 3,
member_level_name: '服务商'
agent_level: 3,
agent_level_name: '服务商'
},
pointsDetail: {
list: [
@@ -606,19 +429,19 @@ const SCENARIO_C_DATA = {
list: [
{
id: 15,
title: '公排退款 - 订单HJF202603110001',
amount: '3600.00',
title: '推荐佣金 - 订单FSGX202603110001',
amount: '1800.00',
pm: 1,
add_time: '2026-03-11 10:00',
order_id: 'HJF202603110001'
order_id: 'FSGX202603110001'
},
{
id: 14,
title: '公排退款 - 订单HJF202603080008',
amount: '3600.00',
title: '推荐佣金 - 订单FSGX202603080008',
amount: '1080.00',
pm: 1,
add_time: '2026-03-08 14:00',
order_id: 'HJF202603080008'
order_id: 'FSGX202603080008'
},
{
id: 13,
@@ -630,11 +453,11 @@ const SCENARIO_C_DATA = {
},
{
id: 12,
title: '公排退款 - 订单HJF202603050007',
amount: '3600.00',
title: '推荐佣金 - 订单FSGX202603050007',
amount: '720.00',
pm: 1,
add_time: '2026-03-05 12:00',
order_id: 'HJF202603050007'
order_id: 'FSGX202603050007'
}
],
count: 28,
@@ -642,6 +465,7 @@ const SCENARIO_C_DATA = {
limit: 15
},
withdrawInfo: {
brokerage_price: '25200.00',
now_money: '25200.00',
min_extract: 100,
fee_rate: 7,
@@ -651,8 +475,8 @@ const SCENARIO_C_DATA = {
]
},
memberInfo: {
member_level: 3,
member_level_name: '服务商',
agent_level: 3,
agent_level_name: '服务商',
direct_count: 15,
umbrella_count: 80,
umbrella_orders: 125,
@@ -771,10 +595,13 @@ const MOCK_SCENARIO_DATA = {
/**
* 场景感知的 Mock 数据获取函数
*/
export function getMockQueueStatus() {
export function getMockBrokerageProgress() {
return JSON.parse(JSON.stringify(MOCK_SCENARIO_DATA[MOCK_SCENARIO].queueStatus));
}
// 兼容旧名称
export const getMockQueueStatus = getMockBrokerageProgress;
export function getMockQueueHistory() {
return JSON.parse(JSON.stringify(MOCK_SCENARIO_DATA[MOCK_SCENARIO].queueHistory));
}