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.
42 lines
974 B
42 lines
974 B
import { ApiServiceEnum, defHttp } from '@/utils/http/axios';
|
|
|
|
enum Api {
|
|
list = '/sys/auth/accessSecret/list',
|
|
getById = '/sys/auth/accessSecret/getById',
|
|
saveUpdate = '/sys/auth/accessSecret/saveUpdate',
|
|
delete = '/sys/auth/accessSecret/batchDeleteById',
|
|
}
|
|
|
|
export const listApi = (params) => {
|
|
return defHttp.post({
|
|
service: ApiServiceEnum.SMART_SYSTEM,
|
|
url: Api.list,
|
|
data: {
|
|
...params,
|
|
},
|
|
});
|
|
};
|
|
|
|
export const saveUpdateApi = (modelList: any[]) => {
|
|
return defHttp.post({
|
|
service: ApiServiceEnum.SMART_SYSTEM,
|
|
url: Api.saveUpdate,
|
|
data: modelList[0],
|
|
});
|
|
};
|
|
|
|
export const deleteApi = (removeRecords: Recordable[]) => {
|
|
return defHttp.post({
|
|
service: ApiServiceEnum.SMART_SYSTEM,
|
|
url: Api.delete,
|
|
data: removeRecords.map((item) => item.id),
|
|
});
|
|
};
|
|
|
|
export const getByIdApi = (id: number) => {
|
|
return defHttp.post({
|
|
service: ApiServiceEnum.SMART_SYSTEM,
|
|
url: Api.getById,
|
|
data: id,
|
|
});
|
|
};
|
|
|