wip: coding

This commit is contained in:
kailong321200875
2022-06-23 22:37:49 +08:00
parent cf738b8701
commit f4c940d95e
15 changed files with 202 additions and 27 deletions

12
src/api/register/index.ts Normal file
View File

@@ -0,0 +1,12 @@
import { useAxios } from '@/hooks/web/useAxios'
import { IUserModel } from '@/api-types/user'
const request = useAxios()
export const getCodeApi = () => {
return request.get<IResponse<string>>({ url: 'user/captcha' })
}
export const registerApi = (data: Omit<IUserModel, 'is_admin'>) => {
return request.post<IResponse<IUserModel>>({ url: 'user/register', data })
}