feat:新增加注册功能

This commit is contained in:
不做码农
2022-07-02 16:50:56 +08:00
parent aed71615d5
commit 206051bafc
5 changed files with 240 additions and 54 deletions
-40
View File
@@ -1,40 +0,0 @@
import request from '@/utils/request'
// 登录方法
export function login(username, password, code, uuid) {
const data = {
username,
password,
code,
uuid
}
return request({
url: '/login',
method: 'POST',
data: data,
})
}
// 获取用户详细信息
export function getInfo() {
return request({
url: '/getInfo',
method: 'get'
})
}
// 退出方法
export function logout() {
return request({
url: '/LogOut',
method: 'POST'
})
}
// 获取验证码
export function getCodeImg() {
return request({
url: '/captchaImage',
method: 'get'
})
}
+16 -5
View File
@@ -9,9 +9,9 @@ export function login(username, password, code, uuid) {
uuid
}
return request({
url: '/login',
method: 'POST',
data: data,
url: '/login',
method: 'POST',
data: data,
})
}
@@ -26,8 +26,8 @@ export function getInfo() {
// 退出方法
export function logout() {
return request({
url: '/LogOut',
method: 'POST'
url: '/LogOut',
method: 'POST'
})
}
@@ -38,3 +38,14 @@ export function getCodeImg() {
method: 'get'
})
}
/**
* 注册
* @returns
*/
export function register(data) {
return request({
url: '/register',
method: 'post',
data: data
})
}