Commit 52c79c9b authored by XieZhiXiong's avatar XieZhiXiong

fixbug

parent 28a0b16c
......@@ -84,12 +84,13 @@ const LevelInfo: React.FC<LevelInfoProps> = ({
},
];
const getHistoryList = () => {
const getHistoryList = (params?) => {
if (fetchList) {
setListLoading(true);
fetchList({
current: page,
pageSize: size,
pageSize: size,
...params,
}).then(res => {
const { data = [], totalCount = 0 } = (res || {});
setList(data);
......@@ -104,10 +105,13 @@ const LevelInfo: React.FC<LevelInfoProps> = ({
getHistoryList();
}, []);
const handlePaginationChange = (page: number, size: number) => {
setPage(page);
setSize(size);
getHistoryList();
const handlePaginationChange = (current: number, pageSize: number) => {
setPage(current);
setSize(pageSize);
getHistoryList({
current,
pageSize,
});
};
return (
......@@ -130,7 +134,7 @@ const LevelInfo: React.FC<LevelInfoProps> = ({
strokeWidth={4}
strokeLinecap="square"
showInfo={false}
percent={nextScore ? (score / levelInfo.nextScore) * 100 : 100}
percent={nextScore ? (score / nextScore) * 100 : 100}
/>
</div>
......
......@@ -193,6 +193,10 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
message.success('保存成功');
getMemberLevelInfo();
}
const errorItem = resArr.find(item => item.code !== 1000);
if (errorItem) {
message.error(errorItem.message);
}
} catch (errInfo) {
}
......
......@@ -82,7 +82,7 @@ const MemberLevel: React.FC<[]> = () => {
},
{
title: '升级阈值',
dataIndex: 'levelUpPoint',
dataIndex: 'point',
align: 'center',
},
{
......
......@@ -38,7 +38,7 @@ const MemberUpgradeRule: React.FC<[]> = () => {
current: page,
pageSize: size,
});
}, [page, size]);
}, []);
const columns: EditableColumns[] = [
{
......@@ -66,9 +66,13 @@ const MemberUpgradeRule: React.FC<[]> = () => {
},
];
const handlePaginationChange = (page: number, size: number) => {
setPage(page);
setSize(size);
const handlePaginationChange = (current: number, pageSize: number) => {
setPage(current);
setSize(pageSize);
getRuleList({
current,
pageSize,
});
};
// 重新保存 dataSource
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment