From f499a5a6453b6da01aa00a98319286d2039f2d71 Mon Sep 17 00:00:00 2001 From: daiyangcheng Date: Fri, 9 Feb 2024 18:52:22 +0800 Subject: [PATCH] Update | Newyear --- src/components/MainSideBar.vue | 4 ++-- src/views/Prize.vue | 36 ++++++++++++++-------------------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/components/MainSideBar.vue b/src/components/MainSideBar.vue index 5d7c122..9e77dff 100644 --- a/src/components/MainSideBar.vue +++ b/src/components/MainSideBar.vue @@ -64,9 +64,9 @@ const menuOptions = [ icon: renderIcon(CompassSharp) }, { - label: '元旦贺岁', + label: '新年活动', key: 'yearly', - show: false, + show: true, icon: renderIcon(PlanetOutline), children: [ { diff --git a/src/views/Prize.vue b/src/views/Prize.vue index 18d46e2..74c0471 100644 --- a/src/views/Prize.vue +++ b/src/views/Prize.vue @@ -9,23 +9,14 @@ 获奖人: - {{ prizeuser }} + {{ + prizeuser }} 暂未开奖 参与用户: - {{ user }} + {{ user }} 没有用户参与欸 @@ -107,18 +98,21 @@ function GetPrizeList() { // 用奖品ID排列 res.forEach((e) => { PrizesList.value[i] = e - - if (e.username.indexOf('|') !== -1) { - users.value[e.id] = e.username.split('|') - } else { - users.value[e.id] = [e.username] + if (e.username != "") { + if (e.username.indexOf('|') !== -1) { + users.value[e.id] = e.username.split('|') + } else { + users.value[e.id] = [e.username] + } } // 获奖用户部分 - if (e.prize_user.indexOf('|') !== -1) { - PrizeUsers.value[e.id] = e.prize_user.split('|') - } else { - PrizeUsers.value[e.id] = [e.prize_user] + if (e.prize_user != "") { + if (e.prize_user.indexOf('|') !== -1) { + PrizeUsers.value[e.id] = e.prize_user.split('|') + } else { + PrizeUsers.value[e.id] = [e.prize_user] + } } i++