2020-04-27 00:21:37 +08:00
|
|
|
import {stringify} from '@/utils/request.qs';
|
2020-04-26 19:52:14 +08:00
|
|
|
import request from '@/utils/request';
|
|
|
|
|
2020-04-27 00:08:28 +08:00
|
|
|
// ========== OAuth2 模块 ==========
|
2020-04-26 19:52:14 +08:00
|
|
|
|
2020-04-27 00:08:28 +08:00
|
|
|
export async function oauth2UsernameAuthenticate(params) {
|
2020-04-26 19:52:14 +08:00
|
|
|
return request(`/system-api/admins/oauth2/username-authenticate?${stringify(params)}`, {
|
|
|
|
method: 'POST',
|
|
|
|
body: {},
|
|
|
|
});
|
|
|
|
}
|
2020-04-27 00:08:28 +08:00
|
|
|
|
|
|
|
// ========== Authorization 模块 ==========
|
|
|
|
|
|
|
|
export async function authorizationMenuResourceTree() {
|
|
|
|
return request('/system-api/admins/authorization/menu-resource-tree', {
|
2020-04-27 00:21:37 +08:00
|
|
|
method: 'GET',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function authorizationResourcePermissions(params) {
|
|
|
|
return request(`/system-api/admins/authorization/resource-permissions`, {
|
|
|
|
method: 'GET',
|
2020-04-27 00:08:28 +08:00
|
|
|
});
|
|
|
|
}
|