fix: 接口变更/请求方法为大写

This commit is contained in:
TsMask
2025-02-20 10:42:34 +08:00
parent 8bfa73a67a
commit 7322759545
83 changed files with 568 additions and 1388 deletions

View File

@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function exportRole(query: Record<string, any>) {
return request({
url: '/system/role/export',
method: 'post',
method: 'POST',
data: query,
responseType: 'blob',
});
@@ -22,7 +22,7 @@ export function exportRole(query: Record<string, any>) {
export function listRole(query: Record<string, any>) {
return request({
url: '/system/role/list',
method: 'get',
method: 'GET',
params: query,
});
}
@@ -35,7 +35,7 @@ export function listRole(query: Record<string, any>) {
export function getRole(roleId: string | number) {
return request({
url: `/system/role/${roleId}`,
method: 'get',
method: 'GET',
});
}
@@ -47,7 +47,7 @@ export function getRole(roleId: string | number) {
export function addRole(data: Record<string, any>) {
return request({
url: '/system/role',
method: 'post',
method: 'POST',
data: data,
});
}
@@ -60,7 +60,7 @@ export function addRole(data: Record<string, any>) {
export function updateRole(data: Record<string, any>) {
return request({
url: '/system/role',
method: 'put',
method: 'PUT',
data: data,
});
}
@@ -73,24 +73,21 @@ export function updateRole(data: Record<string, any>) {
export function delRole(roleId: string | number) {
return request({
url: `/system/role/${roleId}`,
method: 'delete',
method: 'DELETE',
});
}
/**
* 角色状态修改
* @param roleId 角色ID
* @param status 角色状态
* @param statusFlag 角色状态
* @returns object
*/
export function changeRoleStatus(roleId: string, status: string | number) {
export function changeRoleStatus(roleId: string, statusFlag: string | number) {
return request({
url: '/system/role/changeStatus',
method: 'put',
data: {
roleId,
status,
},
url: '/system/role/status',
method: 'PUT',
data: { roleId, statusFlag },
});
}
@@ -101,8 +98,8 @@ export function changeRoleStatus(roleId: string, status: string | number) {
*/
export function dataScope(data: Record<string, any>) {
return request({
url: '/system/role/dataScope',
method: 'put',
url: '/system/role/data-scope',
method: 'PUT',
data: data,
});
}
@@ -112,10 +109,10 @@ export function dataScope(data: Record<string, any>) {
* @param query 查询参数
* @returns object
*/
export function authUserAllocatedList(query: Record<string, any>) {
export function authUserList(query: Record<string, any>) {
return request({
url: '/system/role/authUser/allocatedList',
method: 'get',
url: '/system/role/user/list',
method: 'GET',
params: query,
});
}
@@ -127,8 +124,8 @@ export function authUserAllocatedList(query: Record<string, any>) {
*/
export function authUserChecked(data: Record<string, any>) {
return request({
url: '/system/role/authUser/checked',
method: 'put',
url: '/system/role/user/auth',
method: 'PUT',
data: data,
});
}