From e8729a499a184bfea0a27a07d685dc6048bef925 Mon Sep 17 00:00:00 2001 From: taoya7 <569781231@qq.com> Date: Sun, 1 Oct 2023 13:16:11 +0800 Subject: [PATCH] feat: init --- config/config.ts | 6 ++++++ src/pages/index.tsx | 1 + 2 files changed, 7 insertions(+) diff --git a/config/config.ts b/config/config.ts index 376f0f7..886e748 100644 --- a/config/config.ts +++ b/config/config.ts @@ -18,6 +18,12 @@ export default defineConfig({ dynamicImport: {}, // 按需加载 mountElementId: 'root', // 指定 reactapp 渲染到元素的根元素 id + proxy: { + '/api': { + target: 'https://127.0.0.1:8989' + }, + }, + // 主题 theme: { '@primary-color': 'red', diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 58bad12..d429657 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,6 +1,7 @@ import styles from './index.less'; import { Button } from 'antd' import { BoxDiv } from '@/components/Box' +import { request } from 'umi' export default function IndexPage() { return (