From 2ad24720f946d0315d5d9d03144d8136934cb2e5 Mon Sep 17 00:00:00 2001 From: Zyronon Date: Sun, 23 Nov 2025 02:57:56 +0800 Subject: [PATCH] feat:Optimize the settlement interface and add a sharing function --- components.d.ts | 1 + src/assets/css/style.scss | 7 +++++ src/components/ChannelIcons.vue | 36 ++++++++------------------ src/components/base/Progress.vue | 1 + src/config/env.ts | 2 +- src/pages/article/ArticlesPage.vue | 3 ++- src/pages/layout.vue | 8 +++--- src/pages/word/Statistics.vue | 41 +++++++++++------------------- 8 files changed, 42 insertions(+), 57 deletions(-) diff --git a/components.d.ts b/components.d.ts index 1ced7e82..76ede58f 100644 --- a/components.d.ts +++ b/components.d.ts @@ -54,6 +54,7 @@ declare module 'vue' { IconFluentBookLetter20Regular: typeof import('~icons/fluent/book-letter20-regular')['default'] IconFluentBookNumber20Filled: typeof import('~icons/fluent/book-number20-filled')['default'] IconFluentCalendarDate20Regular: typeof import('~icons/fluent/calendar-date20-regular')['default'] + IconFluentCheckmark20Regular: typeof import('~icons/fluent/checkmark20-regular')['default'] IconFluentCheckmarkCircle16Filled: typeof import('~icons/fluent/checkmark-circle16-filled')['default'] IconFluentCheckmarkCircle16Regular: typeof import('~icons/fluent/checkmark-circle16-regular')['default'] IconFluentCheckmarkCircle20Filled: typeof import('~icons/fluent/checkmark-circle20-filled')['default'] diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index 11115114..61c38667 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -75,6 +75,10 @@ --color-link: #2563EB; --color-card-bg: white; + + + --bg-card-primary: white; + --bg-card-secend: rgb(247, 247, 247); } .footer { @@ -128,6 +132,9 @@ html.dark { --color-card-bg: rgb(30, 31, 34); + --bg-card-primary: rgb(30, 31, 34); + --bg-card-secend: rgb(43, 45, 48); + .footer { &.hide { --color-progress-bar: var(--color-third) !important; diff --git a/src/components/ChannelIcons.vue b/src/components/ChannelIcons.vue index 103e0225..6b837ba5 100644 --- a/src/components/ChannelIcons.vue +++ b/src/components/ChannelIcons.vue @@ -25,7 +25,6 @@ let posterEl = $ref(null) // 计算学习统计数据 const studyStats = $computed(() => { - const accuracyRate = practiceStore.total === 0 ? 100 : Math.round(((practiceStore.total - practiceStore.wrong) / practiceStore.total) * 100) return { total: practiceStore.total, @@ -33,7 +32,6 @@ const studyStats = $computed(() => { review: practiceStore.reviewWordNumber + practiceStore.writeWordNumber, wrong: practiceStore.wrong, correct: practiceStore.total - practiceStore.wrong, - accuracy: accuracyRate, time: msToHourMinute(practiceStore.spend), date: dayjs().format('MM月DD日'), dictionary: baseStore.sdict.name || '未知词书' @@ -125,11 +123,11 @@ const sentence = $computed(() => {
+ class="bounce"> - + @@ -195,10 +193,6 @@ const sentence = $computed(() => {
-
-
{{ studyStats.accuracy }}%
-
正确率
-
{{ studyStats.newWords }}
新词
@@ -207,6 +201,10 @@ const sentence = $computed(() => {
{{ studyStats.review }}
复习
+
+
{{ studyStats.wrong }}
+
错词
+
@@ -235,7 +233,7 @@ const sentence = $computed(() => {
-
+
🎯 分享你的进步
@@ -257,10 +255,10 @@ const sentence = $computed(() => {
-
+
+ class="flex items-center justify-start gap-space color-black px-6 py-3 bg-gray-200 rounded-lg cp hover:bg-gray-300 transition-all duration-200"> 换个背景
@@ -292,6 +290,7 @@ const sentence = $computed(() => {
+
@@ -302,6 +301,7 @@ const sentence = $computed(() => {
+
@@ -315,20 +315,6 @@ const sentence = $computed(() => { diff --git a/src/config/env.ts b/src/config/env.ts index 2d25143d..fdbe2f3a 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -17,7 +17,7 @@ export const ENV = Object.assign(map['DEV'], common) export let AppEnv = { TOKEN: localStorage.getItem('token') ?? '', - IS_OFFICIAL: true, + IS_OFFICIAL: false, IS_LOGIN: false, CAN_REQUEST: false } diff --git a/src/pages/article/ArticlesPage.vue b/src/pages/article/ArticlesPage.vue index 04798fe3..9d10a300 100644 --- a/src/pages/article/ArticlesPage.vue +++ b/src/pages/article/ArticlesPage.vue @@ -168,7 +168,7 @@ const {data: recommendBookList, isFetching} = useFetch(resourceWrap(DICT_LIST.AR