Initial commit

This commit is contained in:
Qingtian239113
2022-03-28 17:29:25 +08:00
commit 6afcaa96fe
83 changed files with 3901 additions and 0 deletions

31
config/config.js Normal file
View 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
View 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
View File

@@ -0,0 +1,6 @@
export default [
{
path:'/',
component:'../pages/index',
}
]