save
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
"commit": "git-cz",
|
||||
"prepare": "husky install",
|
||||
"test": "",
|
||||
"deploy": "push-dir --dir=dist --branch=gh-pages --cleanup",
|
||||
"d2": "git subtree push --prefix dist Web gh-pages"
|
||||
"deploy": "push-dir --dir=dist --branch=gh-pages --cleanup"
|
||||
},
|
||||
"dependencies": {
|
||||
"@opentranslate/baidu": "^1.4.2",
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -36,7 +36,7 @@ export default defineConfig({
|
||||
open: true //如果存在本地服务端口,将在打包后自动展示
|
||||
}) : null,
|
||||
],
|
||||
base:'./',
|
||||
base: './',
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": pathResolve("src"),
|
||||
|
||||
Reference in New Issue
Block a user