From 9674f166b7c6bd3be30c204f1887486e52f405fb Mon Sep 17 00:00:00 2001 From: liaozetao <1107136310@qq.com> Date: Fri, 19 Apr 2024 18:13:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B6=85=E7=BA=A7=E5=B9=B8?= =?UTF-8?q?=E8=BF=90=E7=A4=BC=E7=89=A9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/lucky/LuckyGiftRangeView.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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; });