save
This commit is contained in:
@@ -101,13 +101,13 @@ export function usePlayAudio(url: string) {
|
||||
export function getAudioFileUrl(name: string) {
|
||||
if (name === '机械') {
|
||||
return [
|
||||
`/sound/key-sounds/jixie/机械0.mp3`,
|
||||
`/sound/key-sounds/jixie/机械1.mp3`,
|
||||
`/sound/key-sounds/jixie/机械2.mp3`,
|
||||
`/sound/key-sounds/jixie/机械3.mp3`,
|
||||
`./sound/key-sounds/jixie/机械0.mp3`,
|
||||
`./sound/key-sounds/jixie/机械1.mp3`,
|
||||
`./sound/key-sounds/jixie/机械2.mp3`,
|
||||
`./sound/key-sounds/jixie/机械3.mp3`,
|
||||
]
|
||||
} else {
|
||||
return [`/sound/key-sounds/${name}.mp3`]
|
||||
return [`./sound/key-sounds/${name}.mp3`]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ export const useBaseStore = defineStore('base', {
|
||||
DictType.customDict,
|
||||
].includes(this.current.dictType)) {
|
||||
if (!this.currentDict.originWords.length) {
|
||||
let r = await fetch(`${this.currentDict.url}`)
|
||||
let r = await fetch(`.${this.currentDict.url}`)
|
||||
r.json().then(v => {
|
||||
this.currentDict.originWords = cloneDeep(v)
|
||||
this.currentDict.words = cloneDeep(v)
|
||||
@@ -207,7 +207,7 @@ export const useBaseStore = defineStore('base', {
|
||||
DictType.customArticle,
|
||||
].includes(this.current.dictType)) {
|
||||
if (!this.currentDict.articles.length) {
|
||||
let r = await fetch(`${this.currentDict.url}`)
|
||||
let r = await fetch(`.${this.currentDict.url}`)
|
||||
r.json().then((v: any[]) => {
|
||||
this.currentDict.articles = cloneDeep(v.map(v => {
|
||||
v.id = uuidv4()
|
||||
|
||||
Reference in New Issue
Block a user