Initial commit
This commit is contained in:
31
config/config.js
Normal file
31
config/config.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import {defineConfig} from 'umi';
|
||||
import route from "./route";
|
||||
import proxy from "./proxy";
|
||||
|
||||
|
||||
export default defineConfig({
|
||||
title: '车辆巡检数据大屏',
|
||||
nodeModulesTransform: {
|
||||
type: 'none',
|
||||
},
|
||||
publicPath: "./",
|
||||
history: {
|
||||
type: "hash"
|
||||
},
|
||||
hash: true,
|
||||
routes: route,
|
||||
proxy: proxy,
|
||||
fastRefresh: {},
|
||||
externals: {
|
||||
'react': 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
},
|
||||
antd: {
|
||||
dark: true, // 开启暗色主题
|
||||
compact: true, // 开启紧凑主题
|
||||
},
|
||||
theme: {
|
||||
"primary-color": "#14FDF7",
|
||||
},
|
||||
|
||||
});
|
||||
65
config/proxy.js
Normal file
65
config/proxy.js
Normal file
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
|
||||
* The agent cannot take effect in the production environment
|
||||
* so there is no configuration of the production environment
|
||||
* For details, please see
|
||||
* https://pro.ant.design/docs/deploy
|
||||
*/
|
||||
//线上
|
||||
// const serverApi = 'https://vast-box-api-test.tmp.vastchain.ltd/';
|
||||
// const serverApi = 'https://vast-box-api.app.vastchain.ltd/';
|
||||
//const serverApi = 'http://192.168.3.10:8083';
|
||||
const serverApi = 'http://safety.tmp.kepai365.ltd';
|
||||
|
||||
|
||||
export default {
|
||||
'/tools/': {
|
||||
target: serverApi,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {'^': ''},
|
||||
},
|
||||
'/common/': {
|
||||
target: serverApi,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {'^': ''},
|
||||
},
|
||||
|
||||
'/auth/': {
|
||||
target: serverApi,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {'^': ''},
|
||||
},
|
||||
'/base/': {
|
||||
target: serverApi,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {'^': ''},
|
||||
},
|
||||
'/upload/': {
|
||||
target: serverApi,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {'^': ''},
|
||||
},
|
||||
|
||||
'/vehicle/': {
|
||||
target: serverApi,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {'^': ''},
|
||||
},
|
||||
|
||||
'/manager/': {
|
||||
target: serverApi,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {'^': ''},
|
||||
},
|
||||
'/image/': {
|
||||
target: serverApi,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {'^': ''},
|
||||
},
|
||||
'/module/': {
|
||||
target: serverApi,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {'^': ''},
|
||||
},
|
||||
|
||||
};
|
||||
6
config/route.js
Normal file
6
config/route.js
Normal file
@@ -0,0 +1,6 @@
|
||||
export default [
|
||||
{
|
||||
path:'/',
|
||||
component:'../pages/index',
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user