| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- import http from "@/utils/http";
- import { AppDispatch } from "..";
- import { A7_1topValueType } from "@/pages/A7_1charity";
- /**
- * 获取 慈善堂 列表
- */
- export const A7_1_APIgetList = (data: any) => {
- return async (dispatch: AppDispatch) => {
- const res = await http.post("cms/charity/pageList", data);
- if (res.code === 0) {
- const obj = {
- list: res.data.records,
- total: res.data.total,
- };
- dispatch({
- type: "A7_1/getList",
- payload: obj,
- });
- }
- };
- };
- /**
- * 慈善堂 - 详情
- */
- export const A7_1_APIgetInfo = (id: number) => {
- return http.get(`cms/charity/detail/${id}`);
- };
- /**
- * 慈善堂 - 新增、编辑
- */
- export const A7_1_APIsave = (data: any) => {
- return http.post("cms/charity/save", data);
- };
- /**
- * 慈善堂 刊物 - 删除
- */
- export const A7_1_APIdel = (id: number) => {
- return http.get(`cms/charity/removes/${id}`);
- };
- /**
- * 获取主题列表
- */
- export const A7_1_APIgetListByTheme = (type: A7_1topValueType) => {
- return http.get(`cms/charityTopic/getList?type=${type}`);
- };
- /**
- * 主题 - 删除
- */
- export const A7_1_APIthemeDel = (id: number) => {
- return http.get(`cms/charityTopic/removes/${id}`);
- };
- /**
- * 主题 - 排序
- */
- export const A7_1_APIthemeSort = (id1: number, id2: number) => {
- return http.get(`cms/charityTopic/sort/${id1}/${id2}`);
- };
- /**
- * 主题 - 新增、编辑
- */
- export const A7_1_APIthemeSave = (data: any) => {
- return http.post("cms/charityTopic/save", data);
- };
|