Merge pull request #177 from zyronon/master

fix-bug
This commit is contained in:
Zyronon
2025-11-28 10:29:55 +08:00
committed by GitHub
7 changed files with 15 additions and 17 deletions

View File

@@ -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`,
}
}

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { _nextTick, groupBy, resourceWrap, useNav } from "@/utils";
import {_nextTick, groupBy, isMobile, resourceWrap, useNav} from "@/utils";
import BasePage from "@/components/BasePage.vue";
import { DictResource } from "@/types/types.ts";
import { useRuntimeStore } from "@/stores/runtime.ts";
@@ -105,7 +105,7 @@ watch(dict_list, (val) => {
});
const r = localStorage.getItem('tour-guide');
if (settingStore.first && !r) {
if (settingStore.first && !r && !isMobile()) {
tour.start();
}
}, 500)

View File

@@ -9,7 +9,7 @@ import { Dict, PracticeData, WordPracticeType, ShortcutKey, TaskWords, Word, Wor
import { useDisableEventListener, useOnKeyboardEventListener, useStartKeyboardEventListener } from "@/hooks/event.ts";
import useTheme from "@/hooks/theme.ts";
import { getCurrentStudyWord, useWordOptions } from "@/hooks/dict.ts";
import { _getDictDataByUrl, _nextTick, cloneDeep, resourceWrap, shuffle } from "@/utils";
import {_getDictDataByUrl, _nextTick, cloneDeep, isMobile, resourceWrap, shuffle} from "@/utils";
import { useRoute, useRouter } from "vue-router";
import Footer from "@/pages/word/components/Footer.vue";
import Panel from "@/components/Panel.vue";
@@ -150,7 +150,7 @@ watchOnce(() => data.words.length, (newVal, oldVal) => {
});
const r = localStorage.getItem('tour-guide');
if (settingStore.first && !r) {
if (settingStore.first && !r && !isMobile()) {
tour.start();
}
}, 500)

View File

@@ -2,7 +2,7 @@
import { useBaseStore } from "@/stores/base.ts";
import { useRouter } from "vue-router";
import BaseIcon from "@/components/BaseIcon.vue";
import { _getAccomplishDate, _getDictDataByUrl, _nextTick, resourceWrap, shuffle, useNav } from "@/utils";
import {_getAccomplishDate, _getDictDataByUrl, _nextTick, isMobile, resourceWrap, shuffle, useNav} from "@/utils";
import BasePage from "@/components/BasePage.vue";
import { DictResource, WordPracticeMode } from "@/types/types.ts";
import { onMounted, watch } from "vue";
@@ -224,7 +224,7 @@ onMounted(() => {
]
});
const r = localStorage.getItem('tour-guide');
if (settingStore.first && !r) tour.start();
if (settingStore.first && !r && !isMobile()) tour.start();
}, 500)
})
</script>