Skip to content

Commit b1e3337

Browse files
committed
# Conflicts: # src/views/Login/components/RegisterForm.vue
2 parents 0e20005 + b2dd170 commit b1e3337

File tree

3 files changed

+268
-116
lines changed

3 files changed

+268
-116
lines changed

src/api/login/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import request from '@/config/axios'
22
import { getRefreshToken } from '@/utils/auth'
3-
import type { UserLoginVO } from './types'
3+
import type { RegisterVO, UserLoginVO } from './types'
44

55
export interface SmsCodeVO {
66
mobile: string
@@ -17,6 +17,11 @@ export const login = (data: UserLoginVO) => {
1717
return request.post({ url: '/system/auth/login', data })
1818
}
1919

20+
// 注册
21+
export const register = (data: RegisterVO) => {
22+
return request.post({ url: '/system/auth/register', data })
23+
}
24+
2025
// 刷新访问令牌
2126
export const refreshToken = () => {
2227
return request.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() })

src/api/login/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,10 @@ export type UserVO = {
2929
loginIp: string
3030
loginDate: string
3131
}
32+
33+
export type RegisterVO = {
34+
tenantName: string
35+
username: string
36+
password: string
37+
captchaVerification: string
38+
}

0 commit comments

Comments
 (0)