From 004cf1d5c03306ff7d72e7ca75ded5f9723013f8 Mon Sep 17 00:00:00 2001 From: Xwen <929716663@qq.com> Date: Sat, 23 Dec 2023 15:02:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=96=B0=E5=A2=9E=E7=AD=89=E7=BA=A7=E9=99=90?= =?UTF-8?q?=E5=88=B6=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Bbs.Vue3/src/components/AvatarInfo.vue | 44 ++- Yi.Bbs.Vue3/src/components/DisscussCard.vue | 285 ++++++++++---------- 2 files changed, 187 insertions(+), 142 deletions(-) diff --git a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue index 2d1aa2bb..1f5a565b 100644 --- a/Yi.Bbs.Vue3/src/components/AvatarInfo.vue +++ b/Yi.Bbs.Vue3/src/components/AvatarInfo.vue @@ -9,7 +9,17 @@
- {{ userInfo.nick }} +
{{ userInfo.nick }}
+
+ {{ + userInfo.level + }} +
+
+ + {{ userInfo.userLimit.label }} + +
{{ props.time }}
@@ -48,6 +58,8 @@ const userInfo = reactive({ nick: "", role: [], id: "", + level: 1, + userLimit: 0, }); const iconUrl = ref("/favicon.ico"); const iconUrlHandler = () => { @@ -86,6 +98,8 @@ const Init = () => { userInfo.nick = props.userInfo.nick; userInfo.role = props.userInfo.role; userInfo.id = props.userInfo.id; + userInfo.level = "等级" + props.userInfo.level; + userInfo.userLimit = getStatusInfo(1); iconUrl.value = iconUrlHandler(userInfo.icon); } @@ -98,6 +112,28 @@ const Init = () => { iconUrl.value = userInfo.icon; } }; + +const statusTypeList = [ + { + label: "正常", + value: 0, + type: "success", + }, + { + label: "危险", + value: 1, + type: "warning", + }, + { + label: "已禁止", + value: 2, + type: "danger", + }, +]; + +const getStatusInfo = (type) => { + return statusTypeList.filter((item) => item.value === type)[0]; +}; \ No newline at end of file +