移动端功能基本完成
This commit is contained in:
@@ -25,6 +25,15 @@ export const useConfigStore = defineStore('config', () => {
|
||||
}
|
||||
return apiBaseUrl.value
|
||||
}
|
||||
|
||||
// 获取图片基础 URL(去掉末尾的 /api 部分)
|
||||
const getFileBaseUrl = () => {
|
||||
const base = getApiBaseUrl()
|
||||
if (base) {
|
||||
return base.replace(/\/api$/, '')
|
||||
}
|
||||
return base
|
||||
}
|
||||
|
||||
|
||||
// 设置主题
|
||||
@@ -39,6 +48,7 @@ export const useConfigStore = defineStore('config', () => {
|
||||
theme,
|
||||
setApiBaseUrl,
|
||||
getApiBaseUrl,
|
||||
getFileBaseUrl,
|
||||
setTheme
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user