Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
zyronon committed Dec 6, 2023
1 parent e0d76c2 commit d087b72
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/stores/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,31 @@ export const useBaseStore = defineStore('base', {
}
const runtimeStore = useRuntimeStore()

if (location.href.includes('?mode=article')) {
console.log('文章')
let dict = {
...cloneDeep(DefaultDict),
id: 'article_nce2',
name: "新概念英语2-课文",
description: '新概念英语2-课文',
category: '英语学习',
tags: ['新概念英语'],
url: 'NCE_2.json',
translateLanguage: 'common',
language: 'en',
type: DictType.article,
resourceId: 'article_nce2',
length: 96
}
let rIndex = this.myDictList.findIndex((v: Dict) => v.id === dict.id)
if (rIndex > -1) {
this.myDictList[rIndex] = dict
this.current.index = rIndex
} else {
this.myDictList.push(cloneDeep(dict))
this.current.index = this.myDictList.length - 1
}
}
if (this.current.index < 3) {

} else {
Expand Down

0 comments on commit d087b72

Please sign in to comment.