Skip to content

Commit 2205526

Browse files
committed
优化代码实现。
1 parent f01dc0a commit 2205526

File tree

3 files changed

+252
-119
lines changed

3 files changed

+252
-119
lines changed

src/api/login/index.ts

Lines changed: 7 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,12 @@ export const login = (data: UserLoginVO) => {
1717
return request.post({ url: '/system/auth/login', data })
1818
}
1919

20+
// 注册
21+
export const register = (data: RegisterVO) => {
22+
console.log("data: RegisterVO=========",data)
23+
return request.post({ url: '/system/auth/register', data })
24+
}
25+
2026
// 刷新访问令牌
2127
export const refreshToken = () => {
2228
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)