删除 resource api,移到 admin api
parent
be03d101a3
commit
3b3dec6ab2
|
@ -1,6 +1,8 @@
|
|||
import { stringify } from 'qs';
|
||||
import request from '@/utils/request';
|
||||
|
||||
// auth
|
||||
|
||||
export async function getAdminMenus() {
|
||||
return request('/admin-api/admin/resource/admin_menu_tree');
|
||||
}
|
||||
|
@ -8,3 +10,56 @@ export async function getAdminMenus() {
|
|||
export async function getAdminUrls(params) {
|
||||
return request(`/admin-api/admin/resource/admin_url_list?${stringify(params)}`);
|
||||
}
|
||||
|
||||
// resource
|
||||
|
||||
export async function addResource(params) {
|
||||
return request(`/admin-api/admin/resource/add?${stringify(params)}`, {
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateResource(params) {
|
||||
return request(`/admin-api/admin/resource/update?${stringify(params)}`, {
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
export async function deleteResource(params) {
|
||||
return request(`/admin-api/admin/resource/delete?${stringify(params)}`, {
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
export async function resourceTree(params) {
|
||||
return request(`/admin-api/admin/resource/tree?${stringify(params)}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
// role
|
||||
|
||||
export async function queryRole(params) {
|
||||
return request(`/admin-api/admin/role/page?${stringify(params)}`);
|
||||
}
|
||||
|
||||
export async function deleteRole(params) {
|
||||
return request(`/admin-api/admin/role/delete?${stringify(params)}`, {
|
||||
method: 'POST',
|
||||
body: {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function addRole(params) {
|
||||
return request(`/admin-api/admin/role/add?${stringify(params)}`, {
|
||||
method: 'POST',
|
||||
body: {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateRole(params) {
|
||||
return request(`/admin-api/admin/role/update?${stringify(params)}`, {
|
||||
method: 'POST',
|
||||
body: {},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
import { stringify } from 'qs';
|
||||
import request from '@/utils/request';
|
||||
|
||||
export async function addResource(params) {
|
||||
return request(`/admin-api/admin/resource/add?${stringify(params)}`, {
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateResource(params) {
|
||||
return request(`/admin-api/admin/resource/update?${stringify(params)}`, {
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
export async function deleteResource(params) {
|
||||
return request(`/admin-api/admin/resource/delete?${stringify(params)}`, {
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
export async function resourceTree(params) {
|
||||
return request(`/admin-api/admin/resource/tree?${stringify(params)}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue