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.
69 lines
1.5 KiB
69 lines
1.5 KiB
import _axios from "@/plugins/axios";
|
|
|
|
//登录、注册
|
|
export function loginFun(data = {}) {
|
|
return _axios({
|
|
url: `/v1/userLogin`,
|
|
method: "POST",
|
|
data: { ...data },
|
|
});
|
|
}
|
|
|
|
|
|
//增加用户
|
|
export function addUser(data = {}) {
|
|
return _axios({
|
|
url: `/v1/addUser`,
|
|
method: "POST",
|
|
data: { ...data, id: localStorage.getItem("userId") },
|
|
});
|
|
}
|
|
|
|
//删除用户
|
|
export function delUser(data = {}) {
|
|
return _axios({
|
|
url: `/v1/delUser`,
|
|
method: "POST",
|
|
data: { ...data, id: localStorage.getItem("userId") },
|
|
});
|
|
}
|
|
//修改用户
|
|
export function updateUser(data = {}) {
|
|
return _axios({
|
|
url: `/v1/updateUser`,
|
|
method: "POST",
|
|
data: { ...data, id: localStorage.getItem("userId") },
|
|
});
|
|
}
|
|
//查找用户
|
|
export function getUser(data = {}) {
|
|
return _axios({
|
|
url: `/v1/getUser`,
|
|
method: "POST",
|
|
data: { ...data, id: localStorage.getItem("userId") },
|
|
});
|
|
}
|
|
//修改密码
|
|
export function updatePassword(data = {}) {
|
|
return _axios({
|
|
url: `/v1/updatePassword`,
|
|
method: "POST",
|
|
data: { ...data, id: localStorage.getItem("userId") },
|
|
});
|
|
}
|
|
//查找作弊信息
|
|
export function getzuobi(data = {}) {
|
|
return _axios({
|
|
url: `/v1/getzuobi`,
|
|
method: "POST",
|
|
data: { id: localStorage.getItem("userId"), ...data },
|
|
});
|
|
}
|
|
//警告学生
|
|
export function jinggao(data = {}) {
|
|
return _axios({
|
|
url: `/v1/jinggao`,
|
|
method: "POST",
|
|
data: { id: localStorage.getItem("userId"), ...data },
|
|
});
|
|
}
|