1.代码测试优化

sws 2024-08-26
v1.0.0
sws 2024-08-26 16:45:17 +08:00
parent 48babf6d19
commit 0b23280a4f
3 changed files with 2 additions and 5 deletions

2
.gitignore vendored
View File

@ -12,7 +12,7 @@ node_modules
dist dist
src/types/auto-imports.d.ts src/types/auto-imports.d.ts
src/types/components.d.ts src/types/components.d.ts
src/types/temp.d.ts temp.d.ts
dist-ssr dist-ssr
coverage coverage
*.local *.local

View File

@ -1,3 +0,0 @@
const temp_token = 'f714594929c39071f21856b885f91556' || '';
// 导出token
export default temp_token;

View File

@ -15,7 +15,7 @@ service.interceptors.request.use(
// 如果是本地则使用静态tonken如果是线上则使用cookie的token // 如果是本地则使用静态tonken如果是线上则使用cookie的token
const cookie = get_cookie('admin_info'); const cookie = get_cookie('admin_info');
if (import.meta.env.VITE_APP_BASE_API == '/dev-api') { if (import.meta.env.VITE_APP_BASE_API == '/dev-api') {
let temp_token = await import('../types/stemp.d'); let temp_token = await import('../../temp.d');
config.url = config.url + '?token=' + temp_token.default; config.url = config.url + '?token=' + temp_token.default;
} else { } else {
if (cookie) { if (cookie) {