fix(config): 修复API代理配置和认证密码问题
- 修改auth.js中的默认密码为安全密码admin123 - 移除request.js中的baseURL配置避免重复前缀 - 在请求拦截器中统一添加/api前缀逻辑 - 简化vite.config.js中的代理配置,使用重写规则替代多个重复配置
This commit is contained in:
@@ -13,31 +13,8 @@ export default defineConfig({
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/da': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/pocket': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/l2': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/wms': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/oee': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
},
|
||||
'/crm': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user