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:
@@ -2,8 +2,8 @@
|
||||
<view class="hjf-asset-card">
|
||||
<view class="card-row">
|
||||
<view class="card-item">
|
||||
<view class="label">现金余额(¥)</view>
|
||||
<view class="value">{{ formattedNowMoney }}</view>
|
||||
<view class="label">推荐佣金(¥)</view>
|
||||
<view class="value">{{ formattedBrokeragePrice }}</view>
|
||||
</view>
|
||||
<view class="card-item">
|
||||
<view class="label">待释放积分</view>
|
||||
@@ -23,27 +23,34 @@
|
||||
<script>
|
||||
/**
|
||||
* @file HjfAssetCard.vue
|
||||
* @description 三栏资产展示卡片(现金余额 / 待释放积分 / 已释放积分),渐变背景。用于资产总览等页面。
|
||||
* @see docs/frontend-new-pages-spec.md 第 3.2.3 节
|
||||
* @see pages/users/user_money/index.vue 渐变卡片区域
|
||||
* @description 三栏资产展示卡片(推荐佣金 / 待释放积分 / 已释放积分),渐变背景。
|
||||
* nowMoney prop 已重命名为 brokeragePrice,对应接口 brokerage_price 字段。
|
||||
*/
|
||||
export default {
|
||||
name: 'HjfAssetCard',
|
||||
|
||||
props: {
|
||||
/**
|
||||
* 现金余额(元),字符串便于对接接口返回
|
||||
* 推荐佣金余额(元),对应接口 brokerage_price
|
||||
* @type {string}
|
||||
* @default '0.00'
|
||||
*/
|
||||
nowMoney: {
|
||||
brokeragePrice: {
|
||||
type: String,
|
||||
default: '0.00'
|
||||
},
|
||||
/**
|
||||
* 兼容旧 nowMoney prop(已废弃,优先使用 brokeragePrice)
|
||||
* @type {string}
|
||||
* @deprecated
|
||||
*/
|
||||
nowMoney: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
/**
|
||||
* 待释放积分
|
||||
* @type {number}
|
||||
* @default 0
|
||||
*/
|
||||
frozenPoints: {
|
||||
type: Number,
|
||||
@@ -52,7 +59,6 @@ export default {
|
||||
/**
|
||||
* 已释放积分
|
||||
* @type {number}
|
||||
* @default 0
|
||||
*/
|
||||
availablePoints: {
|
||||
type: Number,
|
||||
@@ -60,8 +66,7 @@ export default {
|
||||
},
|
||||
/**
|
||||
* 今日预计释放积分(不传则不显示底部提示)
|
||||
* @type {number}
|
||||
* @default null
|
||||
* @type {number|null}
|
||||
*/
|
||||
todayRelease: {
|
||||
type: Number,
|
||||
@@ -70,20 +75,17 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
/** 格式化后的现金余额,保留两位小数 */
|
||||
formattedNowMoney() {
|
||||
const num = parseFloat(this.nowMoney);
|
||||
formattedBrokeragePrice() {
|
||||
const src = this.brokeragePrice !== null ? this.brokeragePrice : (this.nowMoney || '0.00');
|
||||
const num = parseFloat(src);
|
||||
return isNaN(num) ? '0.00' : num.toFixed(2);
|
||||
},
|
||||
/** 格式化后的待释放积分 */
|
||||
formattedFrozenPoints() {
|
||||
return Number(this.frozenPoints).toLocaleString();
|
||||
},
|
||||
/** 格式化后的已释放积分 */
|
||||
formattedAvailablePoints() {
|
||||
return Number(this.availablePoints).toLocaleString();
|
||||
},
|
||||
/** 格式化后的今日预计释放 */
|
||||
formattedTodayRelease() {
|
||||
if (this.todayRelease == null) return '';
|
||||
return Number(this.todayRelease).toLocaleString();
|
||||
|
||||
@@ -1,24 +1,34 @@
|
||||
<template>
|
||||
<view class="hjf-queue-progress">
|
||||
<view class="hjf-brokerage-progress">
|
||||
<!-- 环形进度 -->
|
||||
<view class="progress-ring-wrap">
|
||||
<view class="progress-ring" :style="ringStyle">
|
||||
<view class="progress-ring-inner">
|
||||
<text class="progress-text">{{ currentCount }}/{{ triggerMultiple }}</text>
|
||||
<text class="progress-text">{{ cycleCurrent }}/{{ cycleTotal }}</text>
|
||||
<text class="progress-subtext">本周期</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 周期佣金比例说明 -->
|
||||
<view v-if="cycleRates && cycleRates.length" class="cycle-rates-wrap">
|
||||
<view
|
||||
v-for="(rate, idx) in cycleRates"
|
||||
:key="idx"
|
||||
class="cycle-rate-item"
|
||||
:class="{ 'cycle-rate-item--active': idx === cycleCurrent % cycleRates.length }"
|
||||
>
|
||||
<text class="cycle-rate-item__pos">第{{ idx + 1 }}位</text>
|
||||
<text class="cycle-rate-item__rate">{{ rate }}%</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 条形进度 -->
|
||||
<view class="progress-bar-wrap">
|
||||
<view class="progress-bar-track">
|
||||
<view class="progress-bar-fill" :style="barStyle" />
|
||||
</view>
|
||||
<view class="progress-label">
|
||||
<text>当前批次进度</text>
|
||||
<text class="progress-value">{{ currentCount }}/{{ triggerMultiple }}</text>
|
||||
</view>
|
||||
<view v-if="nextRefundNo != null" class="next-refund">
|
||||
下一退款序号: {{ nextRefundNo }}
|
||||
<text>本周期推荐进度</text>
|
||||
<text class="progress-value">{{ cycleCurrent }}/{{ cycleTotal }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -27,63 +37,50 @@
|
||||
<script>
|
||||
/**
|
||||
* @file HjfQueueProgress.vue
|
||||
* @description 公排批次进度组件:环形/条形进度条展示当前批次进度(如 2/4),并显示下一个退款序号。
|
||||
* @see docs/frontend-new-pages-spec.md 第 2.2.2 节
|
||||
* @description 推荐佣金周期进度组件:环形/条形进度条展示当前周期进度(如 1/3),并显示各档佣金比例。
|
||||
* Props 已更新为 cycleCurrent/cycleTotal/cycleRates,与 /api/hjf/brokerage/progress 接口对齐。
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'HjfQueueProgress',
|
||||
props: {
|
||||
/**
|
||||
* 当前批次已入队数
|
||||
* 当前周期内已推荐人数(对应接口 cycle_current)
|
||||
* @type {number}
|
||||
*/
|
||||
currentCount: {
|
||||
cycleCurrent: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
/**
|
||||
* 触发倍数(每多少人触发一批退款,默认 4)
|
||||
* 每个周期的总人数(对应接口 cycle_total)
|
||||
* @type {number}
|
||||
*/
|
||||
triggerMultiple: {
|
||||
cycleTotal: {
|
||||
type: Number,
|
||||
default: 4
|
||||
default: 3
|
||||
},
|
||||
/**
|
||||
* 下一个退款的 queue_no(可选,有值时显示「下一退款序号」)
|
||||
* @type {number|null}
|
||||
* 各档佣金比例数组(百分比整数,对应接口 cycle_rates)
|
||||
* @type {number[]}
|
||||
*/
|
||||
nextRefundNo: {
|
||||
type: Number,
|
||||
default: null
|
||||
cycleRates: {
|
||||
type: Array,
|
||||
default: () => [20, 30, 50]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
/**
|
||||
* 进度百分比(0–100),用于条形/环形展示
|
||||
* @returns {number}
|
||||
*/
|
||||
progressPercent() {
|
||||
const total = this.triggerMultiple;
|
||||
const total = this.cycleTotal;
|
||||
if (!total || total <= 0) return 0;
|
||||
const p = Math.min(100, (this.currentCount / total) * 100);
|
||||
const p = Math.min(100, (this.cycleCurrent / total) * 100);
|
||||
return Math.round(p * 10) / 10;
|
||||
},
|
||||
/**
|
||||
* 环形进度样式(conic-gradient 用 progressPercent)
|
||||
* @returns {Object}
|
||||
*/
|
||||
ringStyle() {
|
||||
return {
|
||||
'--progress-percent': this.progressPercent,
|
||||
'--progress-color': 'var(--view-theme)'
|
||||
};
|
||||
},
|
||||
/**
|
||||
* 条形进度填充宽度与主题色
|
||||
* @returns {Object}
|
||||
*/
|
||||
barStyle() {
|
||||
return {
|
||||
width: this.progressPercent + '%',
|
||||
@@ -95,7 +92,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.hjf-queue-progress {
|
||||
.hjf-brokerage-progress {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
@@ -108,8 +105,8 @@ export default {
|
||||
.progress-ring {
|
||||
--progress-percent: 0;
|
||||
--progress-color: var(--view-theme);
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 50%;
|
||||
background: conic-gradient(
|
||||
var(--progress-color) 0deg,
|
||||
@@ -123,18 +120,64 @@ export default {
|
||||
}
|
||||
|
||||
.progress-ring-inner {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.progress-text {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.progress-subtext {
|
||||
font-size: 20rpx;
|
||||
color: #999;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.cycle-rates-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 24rpx;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.cycle-rate-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 12rpx 20rpx;
|
||||
border-radius: 12rpx;
|
||||
background: #f7f7f7;
|
||||
min-width: 100rpx;
|
||||
|
||||
&--active {
|
||||
background: var(--view-theme, #e93323);
|
||||
|
||||
.cycle-rate-item__pos,
|
||||
.cycle-rate-item__rate {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cycle-rate-item__pos {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.cycle-rate-item__rate {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@@ -168,10 +211,4 @@ export default {
|
||||
font-weight: 600;
|
||||
color: var(--view-theme);
|
||||
}
|
||||
|
||||
.next-refund {
|
||||
margin-top: 12rpx;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
<view class="hjf-refund-notice__icon-wrap">
|
||||
<text class="hjf-refund-notice__icon">✓</text>
|
||||
</view>
|
||||
<view class="hjf-refund-notice__title">恭喜!您的公排订单已退款</view>
|
||||
<view class="hjf-refund-notice__desc">已入账到现金余额</view>
|
||||
<view class="hjf-refund-notice__title">恭喜!佣金已到账</view>
|
||||
<view class="hjf-refund-notice__desc">已入账到佣金余额</view>
|
||||
<view class="hjf-refund-notice__amount">
|
||||
<text class="hjf-refund-notice__amount-label">退款金额</text>
|
||||
<text class="hjf-refund-notice__amount-label">佣金金额</text>
|
||||
<text class="hjf-refund-notice__amount-value">{{ formattedAmount }}</text>
|
||||
</view>
|
||||
<view v-if="orderId" class="hjf-refund-notice__order">
|
||||
@@ -23,8 +23,7 @@
|
||||
<script>
|
||||
/**
|
||||
* @file HjfRefundNotice.vue
|
||||
* @description 公排退款成功后的弹窗通知,展示退款金额、已入账到现金余额、订单号,确认按钮关闭弹窗。
|
||||
* @see docs/frontend-new-pages-spec.md 第 2.2.3 节
|
||||
* @description 佣金到账通知弹窗,展示佣金金额、已入账到佣金余额、订单号,确认按钮关闭弹窗。
|
||||
*/
|
||||
export default {
|
||||
name: 'HjfRefundNotice',
|
||||
|
||||
Reference in New Issue
Block a user