This commit is contained in:
2021-09-17 12:47:42 +08:00
parent 32db8aca51
commit 2898a6362f
13 changed files with 96 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
import auth from '@/config/interfaces/auth'
import auth from '@/api/interfaces/auth'
export {
auth

View File

@@ -0,0 +1,15 @@
import type { LoginData, LoginResponse } from '@/types/auth'
import request from '@/utils/request'
const login = (data: LoginData): Promise<LoginResponse> => {
return request.post('user/auth/login', data)
}
const register = (data: LoginData): Promise<LoginResponse> => {
return request.post('user/auth/register', data)
}
export default {
login,
register
}