File tree Expand file tree Collapse file tree 3 files changed +268
-116
lines changed Expand file tree Collapse file tree 3 files changed +268
-116
lines changed Original file line number Diff line number Diff line change 1
1
import request from '@/config/axios'
2
2
import { getRefreshToken } from '@/utils/auth'
3
- import type { UserLoginVO } from './types'
3
+ import type { RegisterVO , UserLoginVO } from './types'
4
4
5
5
export interface SmsCodeVO {
6
6
mobile : string
@@ -17,6 +17,11 @@ export const login = (data: UserLoginVO) => {
17
17
return request . post ( { url : '/system/auth/login' , data } )
18
18
}
19
19
20
+ // 注册
21
+ export const register = ( data : RegisterVO ) => {
22
+ return request . post ( { url : '/system/auth/register' , data } )
23
+ }
24
+
20
25
// 刷新访问令牌
21
26
export const refreshToken = ( ) => {
22
27
return request . post ( { url : '/system/auth/refresh-token?refreshToken=' + getRefreshToken ( ) } )
Original file line number Diff line number Diff line change @@ -29,3 +29,10 @@ export type UserVO = {
29
29
loginIp : string
30
30
loginDate : string
31
31
}
32
+
33
+ export type RegisterVO = {
34
+ tenantName : string
35
+ username : string
36
+ password : string
37
+ captchaVerification : string
38
+ }
You can’t perform that action at this time.
0 commit comments