Commit 52c79c9b authored by XieZhiXiong's avatar XieZhiXiong

fixbug

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