Files
jdt-admin/build/constant.js
YuanHuakk 914c25e962
All checks were successful
continuous-integration/drone/push Build is passing
feat(custom): 多API版本
2025-09-23 18:27:19 +08:00

25 lines
647 B
JavaScript

export const OUTPUT_DIR = 'dist'
export const PROXY_CONFIG = {
/**
* @desc 主接口代理
* @请求路径 http://localhost:3100/api/login
* @转发路径 http://localhost:3000/api/login
*/
'/api': {
target: 'https://test.wanzhuanyongcheng.cn',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/admin'),
},
/**
* @desc 备用接口代理
* @请求路径 http://localhost:3100/api1/login
* @转发路径 http://localhost:3001/api/login
*/
'/api1': {
target: 'https://api.gxwzwh.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api1/, '/admin'),
},
}