shaogen1995 2 лет назад
Родитель
Сommit
b6896f4753

+ 13 - 0
houtai/src/assets/styles/base.css

@@ -181,3 +181,16 @@ textarea {
   border-radius: 10px;
   background: transparent;
 }
+.myCoverBox {
+  pointer-events: none;
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  z-index: 10;
+  background-color: rgba(0, 0, 0, 0.6);
+  color: #fff;
+  height: 30px;
+  line-height: 30px;
+  text-align: center;
+}

+ 13 - 0
houtai/src/assets/styles/base.less

@@ -238,4 +238,17 @@ textarea {
   -webkit-box-shadow: inset 0 0 5px transparent;
   border-radius: 10px;
   background: transparent;
+}
+.myCoverBox{
+  pointer-events: none;
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  z-index: 10;
+  background-color: rgba(0, 0, 0, 0.6);
+  color: #fff;
+  height: 30px;
+  line-height: 30px;
+  text-align: center;
 }

+ 6 - 6
houtai/src/pages/A1Hot/index.tsx

@@ -12,9 +12,9 @@ import { PieChart } from "echarts/charts";
 import { LabelLayout } from "echarts/features";
 import { CanvasRenderer } from "echarts/renderers";
 import {
-  getHotExhibition,
-  getHotGoods,
-  getHotModule,
+  getHotExhibitionAPI,
+  getHotGoodsAPI,
+  getHotModuleAPI,
 } from "@/store/action/A1Hot";
 
 echarts.use([
@@ -109,7 +109,7 @@ function Hot() {
 
   // 时间改变的时候 获取3个数据
   const getInfoAPIFu1 = useCallback(async () => {
-    const res1 = await getHotModule(select1Ref.current);
+    const res1 = await getHotModuleAPI(select1Ref.current);
     const data1 = res1.data.map((v: any) => {
       return {
         value: v.pcs,
@@ -127,7 +127,7 @@ function Hot() {
     //   select2Ref.current ? select2Ref.current : "visit"
     // );
 
-    const res2 = await getHotExhibition(
+    const res2 = await getHotExhibitionAPI(
       select1Ref.current,
       select2Ref.current ? select2Ref.current : "visit"
     );
@@ -158,7 +158,7 @@ function Hot() {
     //   select3Ref.current ? select3Ref.current : "visit"
     // );
 
-    const res3 = await getHotGoods(
+    const res3 = await getHotGoodsAPI(
       select1Ref.current,
       select2Ref.current ? select2Ref.current : "visit"
     );

+ 13 - 7
houtai/src/pages/A2News/NewsAdd/index.tsx

@@ -1,4 +1,4 @@
-import { newsUploadAPI } from "@/store/action/A2News";
+import { newSaveAPI, newsUploadAPI } from "@/store/action/A2News";
 import { domShowFu, progressDomFu } from "@/utils/domShow";
 import { MessageFu } from "@/utils/message";
 import { Button, DatePicker, Form, Input, Popconfirm, Select } from "antd";
@@ -180,7 +180,7 @@ function NewsAdd({
 
   // 通过校验点击确定
   const onFinish = useCallback(
-    (values: any) => {
+    async (values: any) => {
       setTypeOk(true);
 
       if (fileCheckFu) return;
@@ -200,11 +200,14 @@ function NewsAdd({
           tableType === "news"
             ? imgList.map((v) => v.id).join(",")
             : fileOne.id + "",
+        type: tableType,
       };
-      console.log(obj);
-      if (id > 0) editTableFu();
-      else addTableFu();
-      closePageFu();
+      const res = await newSaveAPI(obj);
+      if (res.code === 0) {
+        if (id > 0) editTableFu();
+        else addTableFu();
+        closePageFu();
+      }
     },
     [
       addTableFu,
@@ -300,7 +303,7 @@ function NewsAdd({
                       >
                         <PlusOutlined />
                       </div>
-                      {imgList.map((v) => (
+                      {imgList.map((v, i) => (
                         <div
                           className="fileBoxRow_r_img"
                           key={v.id}
@@ -313,6 +316,9 @@ function NewsAdd({
                           onDragEnter={(e) => handleDragEnter(e, v)}
                           onDragEnd={() => setDragImg(null)}
                         >
+                          {i === 0 ? (
+                            <div className="myCoverBox">封面</div>
+                          ) : null}
                           {v.filePath ? (
                             <ImageLazy
                               noLook={dragImg ? true : false}

+ 1 - 1
houtai/src/pages/A3Goods/GoodsAdd/index.tsx

@@ -536,7 +536,7 @@ function GoodsAdd({ id, closeMoalFu, addListFu, editListFu }: Props) {
                   >
                     <PlusOutlined />
                   </div>
-                  {fileList.img.map((v) => (
+                  {fileList.img.map((v, i) => (
                     <div
                       className="fileBoxRow_r_img"
                       key={v.id}

+ 3 - 2
houtai/src/pages/A4Venue/VenueEdit/index.tsx

@@ -216,7 +216,7 @@ function VenueEdit({ id, closePageFu, editTableFu }: Props) {
                   >
                     <PlusOutlined />
                   </div>
-                  {imgList.map((v) => (
+                  {imgList.map((v, i) => (
                     <div
                       className="fileBoxRow_r_img"
                       key={v.id}
@@ -229,6 +229,7 @@ function VenueEdit({ id, closePageFu, editTableFu }: Props) {
                       onDragEnter={(e) => handleDragEnter(e, v)}
                       onDragEnd={() => setDragImg(null)}
                     >
+                      {i === 0 ? <div className="myCoverBox">封面</div> : null}
                       {v.filePath ? (
                         <ImageLazy
                           noLook={dragImg ? true : false}
@@ -254,7 +255,7 @@ function VenueEdit({ id, closePageFu, editTableFu }: Props) {
                 <div className="fileTit">
                   {imgList.length >= 2 ? (
                     <>
-                      按住鼠标可拖动图片调整顺序。
+                      按住鼠标可拖动图片调整顺序,第一张为展示端封面
                       <br />
                     </>
                   ) : null}

Разница между файлами не показана из-за своего большого размера
+ 38 - 13
houtai/src/pages/A5Guest/index.tsx


+ 3 - 3
houtai/src/store/action/A1Hot.ts

@@ -3,14 +3,14 @@ import http from "@/utils/http";
 /**
  * 统计热门板块
  */
-export const getHotModule = (dayScope: 1 | 7 | 30 | "") => {
+export const getHotModuleAPI = (dayScope: 1 | 7 | 30 | "") => {
   return http.get(`cms/report/ranking/module?dayScope=${dayScope}`);
 };
 
 /**
  * 统计-热门场馆
  */
-export const getHotExhibition = (
+export const getHotExhibitionAPI = (
   dayScope: 1 | 7 | 30 | "",
   type: "visit" | "star" | ""
 ) => {
@@ -22,7 +22,7 @@ export const getHotExhibition = (
 /**
  * 统计-热门场馆
  */
-export const getHotGoods = (
+export const getHotGoodsAPI = (
   dayScope: 1 | 7 | 30 | "",
   type: "visit" | "star" | ""
 ) => {

+ 7 - 0
houtai/src/store/action/A2News.ts

@@ -26,3 +26,10 @@ export const newsUploadAPI = (data: any) => {
     }),
   });
 };
+
+/**
+ * 新增|编辑
+ */
+export const newSaveAPI = (data: any) => {
+  return http.post("cms/news/save", data);
+};

+ 22 - 0
houtai/src/store/action/A5Guest.ts

@@ -0,0 +1,22 @@
+import http from "@/utils/http";
+
+/**
+ * 配置-获取
+ */
+export const getGuestInfoAPI = () => {
+  return http.get("cms/visitor/getConfig");
+};
+
+/**
+ * 修改参观指南
+ */
+export const setGuestGuideAPI = (data: string) => {
+  return http.post("cms/visitor/setConfigByGuide", { content: data });
+};
+
+/**
+ * 参观须知-修改
+ */
+export const setGuestNoticeAPI = (data: string) => {
+  return http.post("cms/visitor/setConfigByNotice", { content: data });
+};