|
@@ -1,5 +1,5 @@
|
|
|
-import http from "@/utils/http";
|
|
|
-import { AppDispatch } from "..";
|
|
|
+import http from '@/utils/http'
|
|
|
+import { AppDispatch } from '..'
|
|
|
|
|
|
/**
|
|
|
*展览管理-列表
|
|
@@ -7,48 +7,45 @@ import { AppDispatch } from "..";
|
|
|
|
|
|
export const A2_APIgetList = (data: any): any => {
|
|
|
return async (dispatch: AppDispatch) => {
|
|
|
- const res = await http.post("cms/exhibition/pageList", data);
|
|
|
+ const res = await http.post('cms/exhibition/pageList', data)
|
|
|
if (res.code === 0) {
|
|
|
const obj = {
|
|
|
- // 待完善
|
|
|
list: res.data.records.map((v: any) => ({
|
|
|
...v,
|
|
|
activityTime:
|
|
|
- v.type === "long"
|
|
|
- ? ""
|
|
|
- : v.dateStart + " 至 " + (v.dateEnd ? v.dateEnd : "长期有效"),
|
|
|
+ v.type === 'long' ? '' : v.dateStart + ' 至 ' + (v.dateEnd ? v.dateEnd : '长期有效')
|
|
|
})),
|
|
|
- total: res.data.total,
|
|
|
- };
|
|
|
- dispatch({ type: "A2/getList", payload: obj });
|
|
|
+ total: res.data.total
|
|
|
+ }
|
|
|
+ dispatch({ type: 'A2/getList', payload: obj })
|
|
|
}
|
|
|
- };
|
|
|
-};
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
* 展览管理-删除
|
|
|
*/
|
|
|
export const A2_APIdel = (id: number) => {
|
|
|
- return http.get(`cms/exhibition/removes/${id}`);
|
|
|
-};
|
|
|
+ return http.get(`cms/exhibition/removes/${id}`)
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
* 展览管理-获取详情
|
|
|
*/
|
|
|
export const A2_APIgetInfo = (id: number) => {
|
|
|
- return http.get(`cms/exhibition/detail/${id}`);
|
|
|
-};
|
|
|
+ return http.get(`cms/exhibition/detail/${id}`)
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
* 展览管理-新增、编辑
|
|
|
*/
|
|
|
export const A2_APIsave = (data: any) => {
|
|
|
- return http.post("cms/exhibition/save", data);
|
|
|
-};
|
|
|
+ return http.post('cms/exhibition/save', data)
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
* 展览管理-修改 展品 图片的名字
|
|
|
*/
|
|
|
export const A2_APIchangeImgName = (data: any) => {
|
|
|
- return http.post("cms/exhibition/file/update", data);
|
|
|
-};
|
|
|
+ return http.post('cms/exhibition/file/update', data)
|
|
|
+}
|