feat: 线上版本号优化

This commit is contained in:
李强
2024-08-29 09:04:32 +08:00
parent 233774a981
commit 95f7046e49
2 changed files with 1 additions and 47 deletions

View File

@@ -29,7 +29,7 @@ export async function checkVersion(){
return
}
// 获取线上版本号 t为时间戳防止缓存
await axios.get(`/${VERSION_FILE_NAME}?t=${new Date().getTime()}`).then(res => {
await axios.get(`${import.meta.env.VITE_PUBLIC_PATH}${VERSION_FILE_NAME}?t=${new Date().getTime()}`).then(res => {
const {status, data} = res || {}
if (status === 200) {
// 获取当前版本号