2025-03-26

This commit is contained in:
2025-03-26 11:00:21 +08:00
parent 927d7381b8
commit b45f4950d3
468 changed files with 54473 additions and 124 deletions

39
src/api/modules/banner.ts Normal file
View File

@@ -0,0 +1,39 @@
import http from "@/api";
const B = `/banner/items`;
//分页
export const getBannerListApi = (params: any) => {
return http.get<any>(`${B}/index`, params);
};
//新增
export const getBannerListSaveApi = (params: any) => {
console.log("1232323");
return http.post<any>(`${B}/save`, params, {
headers: {
"Content-Type": "application/x-www-form-urlencoded"
}
});
};
//更新
export const getBannerUpApi = (params: any) => {
const { id } = params;
return http.put<any>(`${B}/update/${id}`, params);
};
//详情
export const getBannerReadApi = (params: any) => {
return http.get<any>(`${B}/read/${params}`);
};
//删除
export const getBannerDelApi = (params: any) => {
return http.delete<any>(`${B}/delete/${params}`);
};
//排序
export const getBannerListSortApi = (params: any) => {
const { id, sort } = params;
return http.post<any>(`${B}/sort/${id}`, { sort });
};
//导出
export const getBannerListExportApi = (params: any) => {
return http.get<any>(`${B}/export`, params, {
responseType: "arraybuffer"
});
};