diff --git a/src/views/lucky/LuckyGiftRangeView.vue b/src/views/lucky/LuckyGiftRangeView.vue index 734aba3..24634a6 100644 --- a/src/views/lucky/LuckyGiftRangeView.vue +++ b/src/views/lucky/LuckyGiftRangeView.vue @@ -274,7 +274,13 @@ export default { // 初始化 getFun() { getAll({ giftType: 16 }).then((res) => { - this.inquire.gifts = res.data; + this.inquire.gifts = res.data.map(v => { + let giftName = v.giftName; + if (giftName.startsWith('{') && giftName.endsWith('}')) { + v.giftName = JSON.parse(giftName).zh; + } + return v; + }); this.inquire.value1 = ""; this.inquire.value2 = ""; // this.inquire.value1 = res.data[0].giftId; @@ -408,7 +414,13 @@ export default { message: "加载完成", type: "success", }); - this.dialog.gifts2 = res.data; + this.dialog.gifts2 = res.data.map(v => { + let giftName = v.giftName; + if (giftName.startsWith('{') && giftName.endsWith('}')) { + v.giftName = JSON.parse(giftName).zh; + } + return v; + }); var index = this.dialog.gifts2.findIndex((item) => { return item.giftName == val.rewardName; });