From 389937444a8314ffc47dd19116317d68846151ab Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 9 Mar 2026 10:59:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=B9=B6=E6=B7=BB=E5=8A=A0=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .gitignore | 1 + src/api/model/auth.js | 14 ++ src/views/login/components/emailForm.vue | 120 +++++++++++++ src/views/login/components/passwordForm.vue | 19 +-- src/views/login/index.vue | 8 +- src/views/login/userRegister.vue | 177 +++++++++++++------- src/views/sys/user.vue | 35 +--- 8 files changed, 272 insertions(+), 106 deletions(-) create mode 100644 src/views/login/components/emailForm.vue diff --git a/.env.development b/.env.development index f96c864..4e5d5a1 100644 --- a/.env.development +++ b/.env.development @@ -6,8 +6,8 @@ VUE_APP_TITLE = '' VUE_APP_PJ = '' # 接口地址 -VUE_APP_API_BASEURL = http://127.0.0.1:226/api -VUE_APP_BASEURL = http://127.0.0.1:226 +VUE_APP_API_BASEURL = http://127.0.0.1:3400/api +VUE_APP_BASEURL = http://127.0.0.1:3400/ # 本地端口 VUE_APP_PORT = 2800 diff --git a/.gitignore b/.gitignore index 4a7a0d7..bc1a42a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ node_modules # local env files .env.local .env.*.local +.env.development # Log files npm-debug.log* diff --git a/src/api/model/auth.js b/src/api/model/auth.js index 8b0071a..72fa07c 100644 --- a/src/api/model/auth.js +++ b/src/api/model/auth.js @@ -44,4 +44,18 @@ export default { return await http.post(this.url, data); } }, + register: { + url: `${config.API_URL}/auth/register/`, + name: "用户注册", + req: async function(data={}){ + return await http.post(this.url, data); + } + }, + email_code: { + url: `${config.API_URL}/auth/email_code/`, + name: "发送邮箱验证码", + req: async function(data={}){ + return await http.post(this.url, data); + } + }, } diff --git a/src/views/login/components/emailForm.vue b/src/views/login/components/emailForm.vue new file mode 100644 index 0000000..1c75fd6 --- /dev/null +++ b/src/views/login/components/emailForm.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue index 48c06ba..438ec22 100644 --- a/src/views/login/components/passwordForm.vue +++ b/src/views/login/components/passwordForm.vue @@ -1,7 +1,7 @@ @@ -45,8 +42,8 @@ export default { visitorsdialog: false, visitorform: {}, form: { - user: "admin", - password: "admin", + user: "", + password: "", autologin: false, }, rules: { diff --git a/src/views/login/index.vue b/src/views/login/index.vue index a8985ee..fdf6622 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -35,6 +35,7 @@
+ - - - + + + --> - - - @@ -195,16 +176,6 @@ label-width="100px" label-position="left" > - - - - -