Commit 2000cfcf authored by 李硕's avatar 李硕

排行榜奖品逻辑删除修改

parent 9d1965ff
......@@ -55,12 +55,15 @@ Component({
},
onPrizeUpdate(data, index) {
const { onChange, list, dataName } = this.props;
//排行榜奖品切换不同奖品时改为逻辑删除
if (list[index].type !== data.type) {
console.log('更换奖品的id');
data._id = null;
}
const updatedData = list.map((v, i) => {
if (index === i) return { ...v, ...data }
return v;
})
onChange && onChange(updatedData, dataName)
},
onPrizeAdd(data) {
......
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
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