接口新增

This commit is contained in:
夕阳微笑1 2024-12-05 10:56:43 +08:00
parent 69972771f5
commit f60043d28d
2 changed files with 73 additions and 2 deletions

73
src/api/label/index.ts Normal file
View File

@ -0,0 +1,73 @@
import request from '/@/utils/request';
import { baseUrlHost } from '../baseUrlHost';
/**
* request.post(xxx) post params data
* get请求时paramsdata
*
* api接口集合
* @method getModuleList
* @method getLabelList
* @method deleteLabel
* @method getLabelDetail
* @method saveLabel
* @method updateLabel
*/
export function labelApi() {
return {
getModuleList: () => {
return request({
url: baseUrlHost + '/cpModule/all',
method: 'get',
});
},
getLabelList: (params: object) => {
return request({
url: baseUrlHost + '/cpLabel',
method: 'get',
params,
});
},
getLabelmoduleidList: (moduleid: Number) => {
return request({
url: baseUrlHost + `/cpLabel/moduleid/${moduleid}`,
method: 'get',
});
},
deleteLabel: (id: Number) => {
return request({
url: baseUrlHost + `/cpLabel/${id}`,
method: 'delete',
});
},
getLabelDetail: (id: Number) => {
return request({
url: baseUrlHost + `/cpLabel/${id}`,
method: 'get',
});
},
saveLabel: (data: object) => {
return request({
url: baseUrlHost + '/cpLabel',
method: 'post',
data,
})
},
updateLabel: (data: object) => {
return request({
url: baseUrlHost + '/cpLabel',
method: 'put',
data,
})
},
// uploadFile: (data: object) => {
// return request({
// url: baseUrlHost + '/enAttachment/upload',
// method: 'post',
// data,
// headers: { 'Content-Type': 'application/x-www-form-urlencoded'}
// })
// }
};
}

View File

@ -12,8 +12,6 @@ import { baseUrlHost } from '../baseUrlHost';
export function logApi() {
return {
getlogList: (params: object) => {
// console.log(1111111111111111);
return request({
url: baseUrlHost + '/acLog',
method: 'get',