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.
|
|
|
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'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 发送注册用短信验证码
|
|
|
|
export function sendRegeditCode(params) {
|
|
|
|
return request({
|
|
|
|
url: '/system/user/sendRegeditCode',
|
|
|
|
method: 'post',
|
|
|
|
data:params
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 发送忘记密码用短信验证码
|
|
|
|
export function sendModifyPasswordCode(param) {
|
|
|
|
return request({
|
|
|
|
url: '/system/user/sendModifyPasswordCode',
|
|
|
|
method: 'post',
|
|
|
|
data:param
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 注册用户
|
|
|
|
export function registerUser(param) {
|
|
|
|
return request({
|
|
|
|
url: '/system/user/regeditUser',
|
|
|
|
method: 'post',
|
|
|
|
data:param
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 通过账号获取用户信息
|
|
|
|
export function getUserByUserName(param) {
|
|
|
|
return request({
|
|
|
|
url: '/system/user/getUserByUserName',
|
|
|
|
method: 'post',
|
|
|
|
data:param
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 校验忘记密码验证码
|
|
|
|
export function validModifyPasswordCode(param) {
|
|
|
|
return request({
|
|
|
|
url: '/system/user/validModifyPasswordCode',
|
|
|
|
method: 'post',
|
|
|
|
data:param
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 忘记密码-修改密码
|
|
|
|
export function forgetPassword(param) {
|
|
|
|
return request({
|
|
|
|
url: '/system/user/forgetPassword',
|
|
|
|
method: 'post',
|
|
|
|
data:param
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 登陆初始进入页面
|
|
|
|
export function firstEnterPath(param) {
|
|
|
|
return request({
|
|
|
|
url: '/firstEnterPath',
|
|
|
|
method: 'post',
|
|
|
|
data:param
|
|
|
|
})
|
|
|
|
}
|