From 1a7f67c584dbfdcc939509918a37a6604e1909e5 Mon Sep 17 00:00:00 2001 From: Seven Date: Wed, 14 Jan 2026 03:48:34 +0700 Subject: [PATCH] =?UTF-8?q?feat(i18n):=20=E6=B7=BB=E5=8A=A0=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=A8=A1=E5=9D=97=E7=9A=84=E6=9C=AC=E5=9C=B0=E5=8C=96?= =?UTF-8?q?=E6=94=AF=E6=8C=81=EF=BC=8C=E5=8C=85=E6=8B=AC=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E3=80=81=E8=AF=A6=E6=83=85=E5=92=8C=E5=8A=A0=E8=BD=BD=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=AD=89=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/zh-CN.json | 7 +++++++ src/views/notify/detail.vue | 4 ++-- src/views/notify/index.vue | 7 ++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index 64b5340..7826cd0 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -147,6 +147,13 @@ "support": "支持主流银行快速充值提现" } }, + "notify": { + "title": "通知", + "detail": "详情", + "markAllRead": "全部已读", + "markAllReadSuccess": "全部已读", + "loading": "加载中..." + }, "trade": { "title": "交易", "spot": "现货", diff --git a/src/views/notify/detail.vue b/src/views/notify/detail.vue index 724919a..171b75b 100644 --- a/src/views/notify/detail.vue +++ b/src/views/notify/detail.vue @@ -3,7 +3,7 @@ import { client, safeClient } from "@/api"; import { NotificationTypeIcon } from "./enum"; const props = defineProps<{ id: string }>(); - +const { t } = useI18n(); const { data } = await safeClient(client.api.notifications({ id: props.id }).get()); function getConfigByType(type: string) { @@ -16,7 +16,7 @@ function getConfigByType(type: string) { - 通知详情 + {{ t('notify.detail') }} diff --git a/src/views/notify/index.vue b/src/views/notify/index.vue index 92661f0..6e4ef67 100644 --- a/src/views/notify/index.vue +++ b/src/views/notify/index.vue @@ -8,6 +8,7 @@ import MaterialSymbolsAndroidContacts from "~icons/material-symbols/android-cont import { client, safeClient } from "@/api"; import { NotificationTypeIcon } from "./enum"; +const { t } = useI18n(); const router = useRouter(); const [query] = useResetRef({ limit: 20, @@ -58,7 +59,7 @@ async function handleAllRead() { ids: [], })); const toast = await toastController.create({ - message: "所有通知已标记为已读", + message: t("notify.markAllReadSuccess"), duration: 2000, position: "bottom", color: "success", @@ -87,7 +88,7 @@ onBeforeMount(() => { - 通知 + {{ t('notify.title') }} @@ -127,7 +128,7 @@ onBeforeMount(() => {