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 @@ + +