diff --git a/src/hooks/article.ts b/src/hooks/article.ts index 7511012c..1669e7ae 100644 --- a/src/hooks/article.ts +++ b/src/hooks/article.ts @@ -64,7 +64,7 @@ export function splitEnArticle(text: string, lang: string = 'en', keyboardMap: K // console.log('splitEnArticle length', text.length) text.split('').map((v, i, arr) => { - if (i > 2306) debugger + // if (i > 2306) debugger switch (v) { case ' ': if (word.name) { diff --git a/src/stores/base.ts b/src/stores/base.ts index c99dd1bf..24b848bb 100644 --- a/src/stores/base.ts +++ b/src/stores/base.ts @@ -182,7 +182,7 @@ export const useBaseStore = defineStore('base', { let configStr = localStorage.getItem(SaveDictKey) if (configStr) { let obj: State = JSON.parse(configStr) - this.setState(obj) + // this.setState(obj) } if ([ @@ -197,7 +197,7 @@ export const useBaseStore = defineStore('base', { DictType.customDict, ].includes(this.current.dictType)) { if (!this.currentDict.originWords.length) { - let r = await fetch(`/public/${this.dict.url}`) + let r = await fetch(`${this.currentDict.url}`) r.json().then(v => { this.currentDict.originWords = cloneDeep(v) this.currentDict.words = cloneDeep(v) @@ -212,7 +212,7 @@ export const useBaseStore = defineStore('base', { DictType.customArticle, ].includes(this.current.dictType)) { if (!this.currentDict.articles.length) { - let r = await fetch(`/public/${this.dict.url}`) + let r = await fetch(`${this.currentDict.url}`) r.json().then(v => { this.currentDict.articles = cloneDeep(v) this.load = true