接口新增
This commit is contained in:
parent
69972771f5
commit
f60043d28d
73
src/api/label/index.ts
Normal file
73
src/api/label/index.ts
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
import request from '/@/utils/request';
|
||||||
|
import { baseUrlHost } from '../baseUrlHost';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (不建议写成 request.post(xxx),因为这样 post 时,无法 params 与 data 同时传参)
|
||||||
|
* 注意在写get请求时,参数是params,而不是data,要标注好
|
||||||
|
*
|
||||||
|
* 登录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'}
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
}
|
@ -12,8 +12,6 @@ import { baseUrlHost } from '../baseUrlHost';
|
|||||||
export function logApi() {
|
export function logApi() {
|
||||||
return {
|
return {
|
||||||
getlogList: (params: object) => {
|
getlogList: (params: object) => {
|
||||||
// console.log(1111111111111111);
|
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: baseUrlHost + '/acLog',
|
url: baseUrlHost + '/acLog',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
Loading…
Reference in New Issue
Block a user