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 @@