fix: 积分页支出明细不显示 + integral/list 支持 type 参数

- 前端 points.vue: 支出明细 type 过滤改为 Number(item.type)===2;onLoad 先 await loadUserInfo 再 loadPointsList;请求 getIntegralList 时传 type=2
- 后端 integral/list: 增加可选参数 type(1=收入,2=支出),UserIntegralRecordServiceImpl 支持按 type 筛选
- 新增 backend/shell/test-integral-list.sh 测试 integral/list 支出明细
- 新增 backend/shell/start-front-miao33.sh 使用 nohup 启动 crmeb-front(miao33)

Made-with: Cursor
This commit is contained in:
apple
2026-03-16 07:42:51 +08:00
parent e0e2f50806
commit fcb10e9bc7
8 changed files with 103 additions and 9 deletions

View File

@@ -204,7 +204,7 @@ export default {
}
this.getUserPoints()
this.loadUserInfo()
await this.loadUserInfo()
this.loadPointsList()
},
@@ -447,7 +447,8 @@ export default {
}),
getIntegralList({
page: this.page,
limit: this.limit
limit: this.limit,
type: 2
})
])
@@ -470,8 +471,8 @@ export default {
// 处理积分明细(使用 getIntegralList需要过滤出 type === 2 的支出记录)
if (pointsRes.code === 0 && pointsRes.data) {
// 过滤出支出记录type === 2
const expenseRecords = (pointsRes.data.list || []).filter(item => item.type === 2)
// 过滤出支出记录type === 2,兼容后端返回数字或字符串
const expenseRecords = (pointsRes.data.list || []).filter(item => Number(item.type) === 2)
pointsList = expenseRecords.map(item => ({
id: `points_${item.id}`,
source: 'points', // 标记来源:积分(与模板中的判断保持一致)