From 03b516afa7c434b9f1a72932348ff3d544e60d94 Mon Sep 17 00:00:00 2001
From: AfyerCu <20569838@qq.com>
Date: Fri, 15 Aug 2025 21:30:51 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E7=99=BB=E5=BD=95=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
env/.env | 7 +-
env/.env.production | 2 +-
src/App.vue | 82 ++++++-
src/components/auth/AuthForm.vue | 287 +++++++++++++++++++++++
src/components/auth/VerificationCode.vue | 117 +++++++++
src/http/interceptor.ts | 2 +
src/pages.json | 10 +-
src/pages/auth/index.vue | 140 +++++++++++
8 files changed, 633 insertions(+), 14 deletions(-)
create mode 100644 src/components/auth/AuthForm.vue
create mode 100644 src/components/auth/VerificationCode.vue
create mode 100644 src/pages/auth/index.vue
diff --git a/env/.env b/env/.env
index 399f808..317b5cf 100644
--- a/env/.env
+++ b/env/.env
@@ -8,11 +8,10 @@ VITE_WX_APPID = 'wxa2abb91f64032a2b'
VITE_APP_PUBLIC_BASE=/
# 登录页面
-VITE_LOGIN_URL = '/pages/login/index'
-# 第一个请求地址
-VITE_SERVER_BASEURL = 'https://ukw0y1.laf.run'
+VITE_LOGIN_URL = '/pages/auth/index'
-VITE_UPLOAD_BASEURL = 'https://ukw0y1.laf.run/upload'
+VITE_SERVER_BASEURL = 'http://mapi.xianglexue.com/api/v1'
+VITE_UPLOAD_BASEURL = 'http://mapi.xianglexue.com/api/v1'
# h5是否需要配置代理
VITE_APP_PROXY=false
diff --git a/env/.env.production b/env/.env.production
index 8a1b50c..49d64c1 100644
--- a/env/.env.production
+++ b/env/.env.production
@@ -1,6 +1,6 @@
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
NODE_ENV = 'development'
# 是否去除console 和 debugger
-VITE_DELETE_CONSOLE = true
+VITE_DELETE_CONSOLE = false
# 是否开启sourcemap
VITE_SHOW_SOURCEMAP = false
diff --git a/src/App.vue b/src/App.vue
index b0d9043..d7b4afc 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,25 +1,91 @@
+
+
+
+
+
+ {{ isLogin ? '登录' : '重置密码' }}
+
+
+
+
+
+
+
+
+ 手机号
+
+
+
+
+
+ 密码
+
+
+
+
+
+
+
+
+ 电话号码
+
+
+
+
+
+
+
+
+ 新密码
+
+
+
+
+
+ 确认密码
+
+
+
+ 密码应不少于8位,至少包含数字、字母,且不能包含中文。
+
+
+
+
+
+
+
+
+ 我已阅读并同意《用户协议》、《隐私政策》,以及《个人信息处理规则》
+
+
+
+
+
+
+
+
+ {{ isLogin ? '登录' : '重置密码' }}
+
+
+
+
+
+ {{ isLogin ? '忘记密码?' : '返回登录' }}
+
+
+
+
+
diff --git a/src/components/auth/VerificationCode.vue b/src/components/auth/VerificationCode.vue
new file mode 100644
index 0000000..28aac19
--- /dev/null
+++ b/src/components/auth/VerificationCode.vue
@@ -0,0 +1,117 @@
+
+
+
+
+ 验证码
+
+
+
+ {{ codeText }}
+
+
+
+
diff --git a/src/http/interceptor.ts b/src/http/interceptor.ts
index 2574174..0f7b90d 100644
--- a/src/http/interceptor.ts
+++ b/src/http/interceptor.ts
@@ -68,6 +68,8 @@ const httpInterceptor = {
if (currentToken) {
options.header.Authorization = `Bearer ${currentToken}`
}
+
+ return options
},
}
diff --git a/src/pages.json b/src/pages.json
index 86b05f7..ffee6a3 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -72,6 +72,14 @@
"style": {
"navigationBarTitleText": "Vue Query 请求演示"
}
+ },
+ {
+ "path": "pages/auth/index",
+ "type": "page",
+ "name": "auth",
+ "style": {
+ "navigationStyle": "custom"
+ }
}
],
"subPackages": [
@@ -89,4 +97,4 @@
]
}
]
-}
+}
\ No newline at end of file
diff --git a/src/pages/auth/index.vue b/src/pages/auth/index.vue
new file mode 100644
index 0000000..31783df
--- /dev/null
+++ b/src/pages/auth/index.vue
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 享
+
+
+
+
+ 象乐学
+ 【教师版】
+ 乐学未来,向学而行
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{
+ "name": "auth",
+ "style": {
+ "navigationStyle": "custom",
+ }
+}
+