Commit 84dc4c51 authored by 天马流星拳's avatar 天马流星拳

fix: 领取成功后更新对应月份的领取状态

在领取成功后,修改state中对应月份的receiveStatus为1,以正确反映领取状态
parent 86c32e49
......@@ -169,6 +169,16 @@ class Myqradespage extends React.Component {
const {code, data, message, success} = await API.drawJoin({monthId});
if (success) {
Toast.show("领取成功");
// this.getMonthInfo();
// 领取成功后 修改 对应月份领取的状态
this.setState({
monthInfo: this.state.monthInfo.map(item => {
if (item.monthId === monthId) {
return { ...item, receiveStatus: 1 };
}
return item;
})
});
this.getdrawIndex(monthId);
}
}
......
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