diff --git a/.env b/.env
new file mode 100644
index 0000000..b5b0de0
--- /dev/null
+++ b/.env
@@ -0,0 +1,2 @@
+VITE_BASE_URL=/api
+VITE_REQUEST_TIMEOUT=20000
diff --git a/index.html b/index.html
index 7db672d..5492deb 100644
--- a/index.html
+++ b/index.html
@@ -2,12 +2,25 @@
-
+
+
Vite App
-
+
diff --git a/src/App.vue b/src/App.vue
index 1cedfb0..e8099af 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,14 +6,13 @@
:button="config.button"
:message="config.message"
>
-
+
diff --git a/src/layouts/components/profile.vue b/src/layouts/components/profile.vue
index 1eda464..8eaf6d2 100644
--- a/src/layouts/components/profile.vue
+++ b/src/layouts/components/profile.vue
@@ -1,22 +1,32 @@
-
-
+
+
- 管理员
+ {{ userInfo.username }}
个人中心
- 退出登录
+ 退出登录
-
+
diff --git a/vite.config.ts b/vite.config.ts
index fd46536..524466b 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -13,7 +13,23 @@ import removeConsole from 'vite-plugin-remove-console';
import legacy from '@vitejs/plugin-legacy';
export default ({ command, mode }: ConfigEnv): UserConfigExport => {
+ console.info('command', command);
+ console.info('mode', mode);
return {
+ server: {
+ host: '0.0.0.0',
+ port: 3000,
+ open: false,
+ proxy: {
+ '/api': {
+ target: 'http://39.103.236.147/api', // 测试地址
+ // target: 'http://121.89.192.107:7771', // 预发地址
+ // target: 'https://edu.mashibing.com/api/', // 生产环境
+ changeOrigin: true,
+ rewrite: (path) => path.replace(/^\/api/, ''),
+ },
+ },
+ },
resolve: {
alias: [
{