积分流水

积分流水
This commit is contained in:
amypeng 2026-06-05 17:19:05 +08:00
parent de97f91575
commit 68d4cfe75b
3 changed files with 16 additions and 9 deletions

View File

@ -1,7 +1,7 @@
import React , { useState , useEffect } from 'react';
import { Tag , Pagination } from 'antd';
import { getMemberAccountDetail, getPointsAccountEvent } from '../api';
import { getMemberAccountDetail, getPointsTransaction } from '../api';
import '../indexUser.scss';
@ -18,7 +18,7 @@ const transactionTypeMap = {
};
function getPointsShow(item) {
const config = transactionTypeMap[item.status];
const config = transactionTypeMap[item.transactionType];
if (!config) {
return { className: '', pointsTxt: item.score, statusClass: '', status: '' };
}
@ -45,7 +45,7 @@ function scoreDetail(props){
},[id, page])
function getDetail() {
getPointsAccountEvent(id, { pageNum: page, pageSize: limit }).then(res => {
getPointsTransaction(id, { pageNum: page, pageSize: limit }).then(res => {
if (res && res.data && res.data.code === 200) {
const processedRows = (res.data.rows || []).map(item => ({
...item,
@ -78,18 +78,18 @@ function scoreDetail(props){
{list.map((item, index) => (
<tr key={item.id}>
<td className="time">{item.createTime}</td>
<td className="desc">{item.subject}<br/><p>{item.subjectDesc}</p></td>
<td className="desc">{item.event?.subject}<br/><p>{item.subjectDesc}</p></td>
<td className={`score ${item.pointsShow?.className}`} style={{textAlign: 'center'}}>{item.pointsShow?.pointsTxt}</td>
<td style={{textAlign: 'center'}}>
<span className={`tag ${item.pointsShow?.statusClass}`}>{item.pointsShow?.status}</span>
</td>
<td className="remark">
{item.reason}
{item.event?.reason}
{
item.replyContent &&
item.event?.replyContent &&
<div className="reply">
<i className='iconfont icon-xiaoxi2 font-12 mr8'></i>
管理员{item.replyContent}
管理员{item.event?.replyContent}
</div>
}
</td>

View File

@ -380,10 +380,10 @@ function ZoneUser(props){
onCancel={()=>setDocVisible(false)} onSure={() => { setDocVisible(false); setSuccessVisible(true);getInfo();}}
/>
<ApplyAcitvity visible={acitvityVisible} member={memberInfo} zoneName={zoneInfo?.name}
onCancel={()=>setAcitvityVisible(false)} onSure={() => { showNotification(msg); setAcitvityVisible(false); getInfo();}}
onCancel={()=>setAcitvityVisible(false)} onSure={(msg) => { showNotification(msg); setAcitvityVisible(false); getInfo();}}
/>
<ApplyQA visible={qaVisible} member={memberInfo} zoneName={zoneInfo?.name}
onCancel={()=>setQaVisible(false)} onSure={() => { showNotification(msg); setQaVisible(false); getInfo();}}
onCancel={()=>setQaVisible(false)} onSure={(msg) => { showNotification(msg); setQaVisible(false); getInfo();}}
/>
<Modal

View File

@ -239,6 +239,13 @@ export function getPointsAccountEvent(id){
})
}
export function getPointsTransaction(id){
return fetch({
url:`/zone/points/transaction/currentUser/${id}`,
method: 'get',
})
}
export function getMemberAccountDetail(id, params){
return fetch({
url:`/zone/points/transaction/my/${id}`,