修改api路径问题,以及部分没用变量注释(有一个暂时不敢动)
This commit is contained in:
@@ -1,67 +1,67 @@
|
||||
import request from "@/utils/request";
|
||||
interface paramsType {
|
||||
cluster?: string,
|
||||
contentType?: string,
|
||||
noticeTitle?: string,
|
||||
noticeType?: string,
|
||||
publishId?: number,
|
||||
sendType?: string,
|
||||
pageNum?: number,
|
||||
pageSize?: number
|
||||
}
|
||||
cluster?: string;
|
||||
contentType?: string;
|
||||
noticeTitle?: string;
|
||||
noticeType?: string;
|
||||
publishId?: number;
|
||||
sendType?: string;
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
interface addParamsType {
|
||||
action?: string,
|
||||
cluster?: string,
|
||||
contentType?: string,
|
||||
noticeContent?: string,
|
||||
noticeTitle?: string,
|
||||
noticeType?:string,
|
||||
remark?:string,
|
||||
sendType?: string,
|
||||
senderIds?:number[]
|
||||
}
|
||||
export const getDataListAPI = (params:paramsType) => {
|
||||
interface addParamsType {
|
||||
action?: string;
|
||||
cluster?: string;
|
||||
contentType?: string;
|
||||
noticeContent?: string;
|
||||
noticeTitle?: string;
|
||||
noticeType?: string;
|
||||
remark?: string;
|
||||
sendType?: string;
|
||||
senderIds?: number[];
|
||||
}
|
||||
export const getDataListAPI = (params: paramsType) => {
|
||||
return request({
|
||||
url: "/notice/notice",
|
||||
method: "get",
|
||||
params: params
|
||||
params: params,
|
||||
});
|
||||
};
|
||||
export const getUserListAPI = () => {
|
||||
return request({
|
||||
url: "/admin/user",
|
||||
method: "get"
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
export const getRolesListAPI = () => {
|
||||
return request({
|
||||
url: "/admin/role",
|
||||
method: "get"
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
export const getDeptsListAPI = () => {
|
||||
return request({
|
||||
url: "/admin/dept",
|
||||
method: "get"
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
export const addDataAPI=(addParams:addParamsType)=>{
|
||||
export const addDataAPI = (addParams: addParamsType) => {
|
||||
return request({
|
||||
url:`/notice/notice`,
|
||||
method:'post',
|
||||
data:addParams
|
||||
})
|
||||
}
|
||||
export const deleteDataAPI=(noticeId:number)=>{
|
||||
url: `/notice/notice`,
|
||||
method: "post",
|
||||
data: addParams,
|
||||
});
|
||||
};
|
||||
export const deleteDataAPI = (noticeId: number) => {
|
||||
return request({
|
||||
url:`/notice/notice/${noticeId}`,
|
||||
method:'delete',
|
||||
})
|
||||
}
|
||||
export const getDataAPI=(noticeId:number)=>{
|
||||
url: `/notice/notice/${noticeId}`,
|
||||
method: "delete",
|
||||
});
|
||||
};
|
||||
export const getDataAPI = (noticeId: number) => {
|
||||
return request({
|
||||
url:`/notice/notice/${noticeId}`,
|
||||
method:'get',
|
||||
})
|
||||
}
|
||||
url: `/notice/notice/${noticeId}`,
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user