fix: 静态文件地址追加随机戳避免缓存

This commit is contained in:
TsMask
2023-12-14 11:01:19 +08:00
parent bc1f897660
commit 7edcf1703e

View File

@@ -17,5 +17,5 @@ export function parseUrlPath(path: string) {
const baseUrl = import.meta.env.PROD
? sessionGet('baseUrl') || import.meta.env.VITE_API_BASE_URL
: import.meta.env.VITE_API_BASE_URL;
return `${baseUrl}${path}`;
return `${baseUrl}${path}?r=${Math.random().toFixed(2)}`;
}