You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.1 KiB
JavaScript
61 lines
1.1 KiB
JavaScript
2 years ago
|
import axios from '@/utils/request'
|
||
|
|
||
|
// 获取列表
|
||
|
export function authAdminList(query) {
|
||
|
return axios({
|
||
|
url: "/system/user/list",
|
||
|
method: "get",
|
||
|
params: query
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
//根据当前角色,获取是否为客户角色
|
||
|
export function roleCustomers(query) {
|
||
|
return axios({
|
||
|
url: "/admin/auth/admin/roleCustomers",
|
||
|
method: "get",
|
||
|
params: query
|
||
|
});
|
||
|
}
|
||
|
|
||
|
// 获取客户角色列表
|
||
|
export function authCustomerRoles(query) {
|
||
|
return axios({
|
||
|
url: "/admin/auth/admin/customerRoles",
|
||
|
method: "get",
|
||
|
params: query
|
||
|
});
|
||
|
}
|
||
|
|
||
|
// 保存
|
||
|
export function authAdminSave(data, formName, method = "post") {
|
||
|
let url =
|
||
|
formName === "add"
|
||
|
? "/system/user/save"
|
||
|
: "/system/user/edit";
|
||
|
return axios({
|
||
|
url: url,
|
||
|
method: method,
|
||
|
data: data
|
||
|
});
|
||
|
}
|
||
|
|
||
|
// 删除管理员
|
||
|
export function authAdminDelete(data) {
|
||
|
return axios({
|
||
|
url: "/admin/auth/admin/delete",
|
||
|
method: "post",
|
||
|
data: data
|
||
|
});
|
||
|
}
|
||
|
|
||
|
export function updateInv(data) {
|
||
|
return axios({
|
||
|
url: "/admin/auth/admin/updateInv",
|
||
|
method: "post",
|
||
|
data: data
|
||
|
});
|
||
|
}
|
||
|
|