From 4cad951b44b7328a086439339e51596183ffb3a9 Mon Sep 17 00:00:00 2001 From: Seven Date: Thu, 8 Jan 2026 17:56:14 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=95=B4=E5=90=88=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96=E5=92=8C=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E9=80=9A=E7=9F=A5=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/types.ts | 4 ++ src/views/notify/detail.vue | 35 +++++-------- src/views/notify/enum.ts | 18 +++++++ src/views/notify/index.vue | 99 ++++++++++++++++++++++++++++++++----- 4 files changed, 119 insertions(+), 37 deletions(-) create mode 100644 src/views/notify/enum.ts diff --git a/src/api/types.ts b/src/api/types.ts index 76b1bec..ef56764 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -80,6 +80,10 @@ export type HoldingsData = Treaty.Data; export type HoldingItem = HoldingsData extends { data: Array } ? T : HoldingsData extends Array ? T : never; +export type NotificationData = Treaty.Data["data"][number]; + +export type NotificationBody = TreatyQuery; + /** * 应用版本信息 */ diff --git a/src/views/notify/detail.vue b/src/views/notify/detail.vue index 96013d5..4e2f23d 100644 --- a/src/views/notify/detail.vue +++ b/src/views/notify/detail.vue @@ -1,24 +1,13 @@ @@ -31,34 +20,32 @@ function handleBack() { -
+
-
+
- +
- {{ notification.title }} + {{ data.title }}
- {{ useDateFormat(notification.date, 'YYYY-MM-DD HH:mm:ss') }} + {{ useDateFormat(data.createdAt, 'YYYY-MM-DD HH:mm:ss') }}
-

- {{ notification.content }} + {{ data.content }}

-
diff --git a/src/views/notify/enum.ts b/src/views/notify/enum.ts new file mode 100644 index 0000000..2d244ed --- /dev/null +++ b/src/views/notify/enum.ts @@ -0,0 +1,18 @@ +export const NotificationTypeIcon = { + system: { + icon: "solar:bell-bing-linear", + color: "#46a724", + }, + security: { + icon: "solar:shield-check-linear", + color: "#f52323", + }, + transaction: { + icon: "solar:transfer-horizontal-linear", + color: "#007aff", + }, + activity: { + icon: "solar:calendar-mark-line-duotone", + color: "#ffa22d", + }, +} as const; diff --git a/src/views/notify/index.vue b/src/views/notify/index.vue index 1ca6922..7f4ebf7 100644 --- a/src/views/notify/index.vue +++ b/src/views/notify/index.vue @@ -1,43 +1,110 @@