开发: 登录等功能

This commit is contained in:
zhengw
2023-04-07 17:38:15 +08:00
parent f639dc8284
commit 5834254a8f
27 changed files with 1475 additions and 153 deletions

View File

@@ -2,7 +2,6 @@
import { defineConfig } from '@umijs/max';
import { join } from 'path';
import defaultSettings from './defaultSettings';
import proxy from './proxy';
import routes from './routes';
const { REACT_APP_ENV = 'dev' } = process.env;
@@ -14,7 +13,10 @@ export default defineConfig({
* @doc https://umijs.org/docs/api/config#hash
*/
hash: true,
// hash 路由
// history: {
// type: 'hash',
// },
/**
* @name 兼容性设置
* @description 设置 ie11 不一定完美兼容,需要检查自己使用的所有依赖
@@ -54,7 +56,14 @@ export default defineConfig({
* @doc 代理介绍 https://umijs.org/docs/guides/proxy
* @doc 代理配置 https://umijs.org/docs/api/config#proxy
*/
proxy: proxy[REACT_APP_ENV as keyof typeof proxy],
// proxy: proxy[REACT_APP_ENV as keyof typeof proxy],
proxy: {
'/api/': {
target: 'http://192.168.1.219:8183/',
changeOrigin: true,
pathRewrite: { '^/api': '' },
},
},
/**
* @name 快速热更新配置
* @description 一个不错的热更新组件,更新时可以保留 state
@@ -76,11 +85,12 @@ export default defineConfig({
* @name layout 插件
* @doc https://umijs.org/docs/max/layout-menu
*/
title: 'Ant Design Pro',
title: 'SCRM',
layout: {
locale: true,
locale: false,
...defaultSettings,
},
/**
* @name moment2dayjs 插件
* @description 将项目中的 moment 替换为 dayjs