feat: crud

This commit is contained in:
luchang
2024-05-22 19:14:37 +08:00
parent 4e1cd06e6e
commit 20293b6283
21 changed files with 1381 additions and 1065 deletions
+7 -24
View File
@@ -9,36 +9,19 @@
*
* @doc https://umijs.org/docs/guides/proxy
*/
const { API_HOST_URL = 'localhost:3000' } = process.env;
export default {
// 如果需要自定义本地开发服务器 请取消注释按需调整
// dev: {
// // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
// '/api/': {
// // 要代理的地址
// target: 'https://preview.pro.ant.design',
// // 配置了这个可以从 http 代理到 https
// // 依赖 origin 的功能可能需要这个,比如 cookie
// changeOrigin: true,
// },
// },
/**
* @name 详细的代理配置
* @doc https://github.com/chimurai/http-proxy-middleware
*/
test: {
dev: {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
'/api/': {
target: 'https://proapi.azurewebsites.net',
changeOrigin: true,
pathRewrite: { '^': '' },
},
},
pre: {
'/api/': {
target: 'your pre url',
// 要代理的地址
target: API_HOST_URL,
// 配置了这个可以从 http 代理到 https
// 依赖 origin 的功能可能需要这个,比如 cookie
changeOrigin: true,
pathRewrite: { '^': '' },
},
},
};