From 8d0ace57e1010c8f4028bbab7ad30a775496ba3f Mon Sep 17 00:00:00 2001 From: Zyronon Date: Fri, 28 Nov 2025 10:20:15 +0800 Subject: [PATCH] fix-bug --- src/config/env.ts | 10 ++++------ src/pages/article/ArticlesPage.vue | 4 ++-- src/pages/article/PracticeArticles.vue | 4 ++-- src/pages/word/DictDetail.vue | 2 +- src/pages/word/DictList.vue | 4 ++-- src/pages/word/PracticeWords.vue | 4 ++-- src/pages/word/WordsPage.vue | 4 ++-- 7 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/config/env.ts b/src/config/env.ts index 0c66799f..85c26557 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -30,16 +30,14 @@ AppEnv.CAN_REQUEST = AppEnv.IS_LOGIN && AppEnv.IS_OFFICIAL export const RESOURCE_PATH = ENV.API + 'static' -const BASE_URL = (import.meta as any).env?.BASE_URL || '/' - export const DICT_LIST = { WORD: { - ALL: `${BASE_URL}list/word.json`, - RECOMMENDED: `${BASE_URL}list/recommend_word.json`, + ALL: `/list/word.json`, + RECOMMENDED: `/list/recommend_word.json`, }, ARTICLE: { - ALL: `${BASE_URL}list/article.json`, - RECOMMENDED: `${BASE_URL}list/article.json`, + ALL: `/list/article.json`, + RECOMMENDED: `/list/article.json`, } } diff --git a/src/pages/article/ArticlesPage.vue b/src/pages/article/ArticlesPage.vue index 1fbcae39..7aa77d7d 100644 --- a/src/pages/article/ArticlesPage.vue +++ b/src/pages/article/ArticlesPage.vue @@ -2,7 +2,7 @@ import { useBaseStore } from "@/stores/base.ts"; import { useRouter } from "vue-router"; import BasePage from "@/components/BasePage.vue"; -import { _getDictDataByUrl, _nextTick, msToHourMinute, resourceWrap, total, useNav } from "@/utils"; +import {_getDictDataByUrl, _nextTick, isMobile, msToHourMinute, resourceWrap, total, useNav} from "@/utils"; import { DictResource, DictType } from "@/types/types.ts"; import { useRuntimeStore } from "@/stores/runtime.ts"; import BaseIcon from "@/components/BaseIcon.vue"; @@ -97,7 +97,7 @@ watch(() => store?.sbook?.id, (n) => { }); const r = localStorage.getItem('tour-guide'); - if (settingStore.first && !r) { + if (settingStore.first && !r && !isMobile()) { tour.start(); } }, 500) diff --git a/src/pages/article/PracticeArticles.vue b/src/pages/article/PracticeArticles.vue index 381a6607..05d8b997 100644 --- a/src/pages/article/PracticeArticles.vue +++ b/src/pages/article/PracticeArticles.vue @@ -18,7 +18,7 @@ import { import { useDisableEventListener, useOnKeyboardEventListener, useStartKeyboardEventListener } from "@/hooks/event.ts"; import useTheme from "@/hooks/theme.ts"; import Toast from '@/components/base/toast/Toast.ts' -import { _getDictDataByUrl, _nextTick, cloneDeep, msToMinute, resourceWrap, total } from "@/utils"; +import {_getDictDataByUrl, _nextTick, cloneDeep, isMobile, msToMinute, resourceWrap, total} from "@/utils"; import { usePracticeStore } from "@/stores/practice.ts"; import { useArticleOptions } from "@/hooks/dict.ts"; import { genArticleSectionData, usePlaySentenceAudio } from "@/hooks/article.ts"; @@ -186,7 +186,7 @@ watch(() => articleData?.article?.id, id => { ] }); const r = localStorage.getItem('tour-guide'); - if (settingStore.first && !r) { + if (settingStore.first && !r && !isMobile()) { tour.start(); } }, 500) diff --git a/src/pages/word/DictDetail.vue b/src/pages/word/DictDetail.vue index 0fb553ab..53cef836 100644 --- a/src/pages/word/DictDetail.vue +++ b/src/pages/word/DictDetail.vue @@ -434,7 +434,7 @@ watch(() => loading, (val) => { }); const r = localStorage.getItem('tour-guide'); - if (settingStore.first && !r) { + if (settingStore.first && !r && !isMobile()) { tour.start(); } }, 500) diff --git a/src/pages/word/DictList.vue b/src/pages/word/DictList.vue index be890913..67bdfd1f 100644 --- a/src/pages/word/DictList.vue +++ b/src/pages/word/DictList.vue @@ -1,5 +1,5 @@