You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.2 KiB
57 lines
1.2 KiB
![]()
2 years ago
|
import request from '@/utils/request'
|
||
|
import qs from 'qs'
|
||
|
//登录
|
||
|
export function login(data) {
|
||
|
return request({
|
||
|
url: '/portal/v1/sysuser/login',
|
||
|
method: 'post',
|
||
|
data: data,
|
||
|
headers: {'Content-Type': 'application/json'}
|
||
|
})
|
||
|
}
|
||
|
// 用户注册
|
||
|
export function registUser(data) {
|
||
|
return request({
|
||
|
url: '/system/user/save',
|
||
|
method: 'post',
|
||
|
data,
|
||
|
headers:{'Content-Type':'application/x-www-form-urlencoded;'}
|
||
|
})
|
||
|
}
|
||
|
// 获取手机验证码
|
||
|
export function getVerificationCode(data) {
|
||
|
return request({
|
||
|
url: '/system/user/getVerificationCode',
|
||
|
method: 'get',
|
||
|
params: data
|
||
|
})
|
||
|
}
|
||
|
|
||
|
// 获取登录验证码
|
||
|
export function imgCode() {
|
||
|
return request({
|
||
|
url: '/system/api/defaultBlendCode?temm=' + new Date().getTime(),
|
||
|
method: 'get'
|
||
|
})
|
||
|
}
|
||
|
|
||
|
// 获取用信息
|
||
|
export function getInfo(token) {
|
||
|
return request({
|
||
|
url: '/system/user/loginDetails',
|
||
|
method: 'post',
|
||
|
})
|
||
|
}
|
||
|
|
||
|
// 根据token值获取登录后的用户信息
|
||
|
export function loginDetails(data) {
|
||
|
return request({
|
||
|
url: '/portal/v1/sysuser/loginDetails',
|
||
|
method: 'post',
|
||
|
data: data,
|
||
|
headers: {
|
||
|
'Content-Type': 'application/json'
|
||
|
}
|
||
|
})
|
||
|
}
|