From d20d31ebcdace0ce25919cf0b8381f54a242ffb6 Mon Sep 17 00:00:00 2001 From: liaozetao <1107136310@qq.com> Date: Fri, 19 Apr 2024 14:18:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B0=94=E6=B3=A1=E5=92=8C?= =?UTF-8?q?=E8=B5=84=E6=96=99=E5=8D=A1=E5=B1=95=E7=A4=BA=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/WeekStarConfigAdminView.vue | 20 +++++++++++++++---- src/views/chatbubble/ChatbubbleRecordView.vue | 14 ++++++++++++- src/views/infocard/InfocardRecordView.vue | 14 ++++++++++++- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/views/activity/WeekStarConfigAdminView.vue b/src/views/activity/WeekStarConfigAdminView.vue index 1068e4f..4dae010 100644 --- a/src/views/activity/WeekStarConfigAdminView.vue +++ b/src/views/activity/WeekStarConfigAdminView.vue @@ -166,8 +166,14 @@ export default { field: 'charmAward', title: '魅力榜奖励', align: 'center', valign: 'middle', formatter: function (val, row, index) { var packArr = JSON.parse(val); var str = ''; - for (var i = 0; i < packArr.length; i++) { - str += packObj[packArr[i]] + ','; + for (var i = 0, len = packArr.length; i < len; i++) { + let value = packObj[packArr[i]]; + if (value) { + str += value; + } + if (i != len - 1) { + str += ','; + } } return str.substr(0, str.length - 2); } @@ -176,8 +182,14 @@ export default { field: 'levelAward', title: '豪气榜奖励', align: 'center', valign: 'middle', formatter: function (val, row, index) { var packArr = JSON.parse(val); var str = ''; - for (var i = 0; i < packArr.length; i++) { - str += packObj[packArr[i]] + ','; + for (var i = 0, len = packArr.length; i < len; i++) { + let value = packObj[packArr[i]]; + if (value) { + str += value; + } + if (i != len - 1) { + str += ','; + } } return str.substr(0, str.length - 2); } diff --git a/src/views/chatbubble/ChatbubbleRecordView.vue b/src/views/chatbubble/ChatbubbleRecordView.vue index a0ac432..94c6c0d 100644 --- a/src/views/chatbubble/ChatbubbleRecordView.vue +++ b/src/views/chatbubble/ChatbubbleRecordView.vue @@ -51,7 +51,19 @@ export default { columns: [ { field: 'id', title: 'id', visible: false, align: 'center', width: '5%' }, { field: 'bubbleId', title: '装扮ID', align: 'center', width: '5%' }, - { field: 'bubbleName', title: '装扮名称', align: 'center', width: '5%' }, + { + field: 'bubbleName', + title: '装扮名称', + align: 'center', + width: '5%', + formatter: function (val) { + let value = val; + if (val && val.startsWith('{') && val.endsWith('}')) { + value = JSON.parse(val).zh; + } + return value; + } + }, { field: 'erbanNo', title: '获得用户ID', align: 'center', width: '5%' }, { field: 'nick', title: '用户昵称', align: 'center', width: '5%' }, { diff --git a/src/views/infocard/InfocardRecordView.vue b/src/views/infocard/InfocardRecordView.vue index cae5211..375597b 100644 --- a/src/views/infocard/InfocardRecordView.vue +++ b/src/views/infocard/InfocardRecordView.vue @@ -51,7 +51,19 @@ export default { columns: [ { field: 'id', title: 'id', visible: false, align: 'center', width: '5%' }, { field: 'cardId', title: '装扮ID', align: 'center', width: '5%' }, - { field: 'cardName', title: '装扮名称', align: 'center', width: '5%' }, + { + field: 'cardName', + title: '装扮名称', + align: 'center', + width: '5%', + formatter: function (val) { + let value = val; + if (val && val.startsWith('{') && val.endsWith('}')) { + value = JSON.parse(val).zh; + } + return value; + } + }, { field: 'erbanNo', title: '获得用户ID', align: 'center', width: '5%' }, { field: 'nick', title: '用户昵称', align: 'center', width: '5%' }, {