From 2205526a792a943a42770261546851572bdbebee Mon Sep 17 00:00:00 2001
From: scholar <1145227973@qq.com>
Date: Fri, 6 Sep 2024 16:14:59 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E5=AE=9E=E7=8E=B0=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/login/index.ts | 8 +-
src/api/login/types.ts | 7 +
src/views/Login/components/RegisterForm.vue | 356 +++++++++++++-------
3 files changed, 252 insertions(+), 119 deletions(-)
diff --git a/src/api/login/index.ts b/src/api/login/index.ts
index ef86563b..f198e357 100644
--- a/src/api/login/index.ts
+++ b/src/api/login/index.ts
@@ -1,6 +1,6 @@
import request from '@/config/axios'
import { getRefreshToken } from '@/utils/auth'
-import type { UserLoginVO } from './types'
+import type {RegisterVO, UserLoginVO} from './types'
export interface SmsCodeVO {
mobile: string
@@ -17,6 +17,12 @@ export const login = (data: UserLoginVO) => {
return request.post({ url: '/system/auth/login', data })
}
+// 注册
+export const register = (data: RegisterVO) => {
+ console.log("data: RegisterVO=========",data)
+ return request.post({ url: '/system/auth/register', data })
+}
+
// 刷新访问令牌
export const refreshToken = () => {
return request.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() })
diff --git a/src/api/login/types.ts b/src/api/login/types.ts
index fff81225..b5790e62 100644
--- a/src/api/login/types.ts
+++ b/src/api/login/types.ts
@@ -29,3 +29,10 @@ export type UserVO = {
loginIp: string
loginDate: string
}
+
+export type RegisterVO = {
+ tenantName: string
+ username: string
+ password: string
+ captchaVerification: string
+}
diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/Login/components/RegisterForm.vue
index 23b3bd42..64675103 100644
--- a/src/views/Login/components/RegisterForm.vue
+++ b/src/views/Login/components/RegisterForm.vue
@@ -1,142 +1,262 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From b2dd170884b6283fb9eb7e9d303715839d830a6a Mon Sep 17 00:00:00 2001
From: scholar <1145227973@qq.com>
Date: Tue, 10 Sep 2024 11:35:49 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=B3=A8=E5=86=8C?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/login/index.ts | 3 +-
src/views/Login/components/RegisterForm.vue | 126 ++++++++++++--------
2 files changed, 74 insertions(+), 55 deletions(-)
diff --git a/src/api/login/index.ts b/src/api/login/index.ts
index f198e357..dec14fb3 100644
--- a/src/api/login/index.ts
+++ b/src/api/login/index.ts
@@ -1,6 +1,6 @@
import request from '@/config/axios'
import { getRefreshToken } from '@/utils/auth'
-import type {RegisterVO, UserLoginVO} from './types'
+import type { RegisterVO, UserLoginVO } from './types'
export interface SmsCodeVO {
mobile: string
@@ -19,7 +19,6 @@ export const login = (data: UserLoginVO) => {
// 注册
export const register = (data: RegisterVO) => {
- console.log("data: RegisterVO=========",data)
return request.post({ url: '/system/auth/register', data })
}
diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/Login/components/RegisterForm.vue
index 64675103..8ede9445 100644
--- a/src/views/Login/components/RegisterForm.vue
+++ b/src/views/Login/components/RegisterForm.vue
@@ -37,6 +37,16 @@
/>
+
+
+
+
+