Explorar el Código

Merge branch 'master' of http://face3d.4dage.com:7005/chenzimin2/ZGZQBWG

任一存 hace 1 año
padre
commit
63ad232cac
Se han modificado 100 ficheros con 571 adiciones y 263 borrados
  1. 0 0
      hot - 副本/.browserslistrc
  2. 0 0
      hot - 副本/.eslintrc.js
  3. 0 0
      hot - 副本/.gitignore
  4. 0 0
      hot - 副本/README.md
  5. 0 0
      hot - 副本/babel.config.js
  6. 0 0
      hot - 副本/package-lock.json
  7. 0 0
      hot - 副本/package.json
  8. 0 0
      hot - 副本/public/index.html
  9. 0 0
      hot - 副本/src/App.vue
  10. 0 0
      hot - 副本/src/assets/base.css
  11. 0 0
      hot - 副本/src/assets/images/IMGerror.png
  12. 0 0
      hot - 副本/src/assets/images/loading.gif
  13. 0 0
      hot - 副本/src/assets/images/pc/audio.png
  14. 0 0
      hot - 副本/src/assets/images/pc/audioAc.png
  15. 0 0
      hot - 副本/src/assets/images/pc/icon-left.png
  16. 0 0
      hot - 副本/src/assets/images/pc/icon-right.png
  17. 0 0
      hot - 副本/src/assets/images/pc/icon1.png
  18. 0 0
      hot - 副本/src/assets/images/pc/icon1Ac.png
  19. 0 0
      hot - 副本/src/assets/images/pc/icon2.png
  20. 0 0
      hot - 副本/src/assets/images/pc/icon2Ac.png
  21. 0 0
      hot - 副本/src/assets/images/pc/icon3.png
  22. 0 0
      hot - 副本/src/assets/images/pc/icon3Ac.png
  23. 0 0
      hot - 副本/src/assets/images/pc/left.png
  24. 0 0
      hot - 副本/src/assets/images/pc/right.png
  25. 0 0
      hot - 副本/src/assets/logo.png
  26. 0 0
      hot - 副本/src/components/HelloWorld.vue
  27. 0 0
      hot - 副本/src/main.js
  28. 0 0
      hot - 副本/src/router/index.js
  29. 0 0
      hot - 副本/src/utils/browser.js
  30. 0 0
      hot - 副本/src/utils/http.js
  31. 0 0
      hot - 副本/src/views/About.vue
  32. 4 5
      hot - 离线版/src/views/Home.vue
  33. 0 0
      hot - 副本/vue.config.js
  34. 1 1
      hot/src/views/Home.vue
  35. 1 1
      houtai/src/components/Z_RichText/index.tsx
  36. 6 6
      houtai/src/pages/A1Rule/RuleEdit/index.tsx
  37. 9 5
      houtai/src/pages/A1Rule/TopicSetting/index.tsx
  38. 9 4
      houtai/src/pages/A1Rule/index.module.scss
  39. 180 29
      houtai/src/pages/A1Rule/index.tsx
  40. 3 1
      houtai/src/pages/A2Integral/index.tsx
  41. 1 17
      houtai/src/pages/A3User/index.tsx
  42. 253 134
      houtai/src/pages/A4Prize/index.tsx
  43. 14 3
      houtai/src/pages/A5Exchange/index.tsx
  44. 29 3
      houtai/src/pages/A6IDUser/IntegralEdit/index.tsx
  45. 47 33
      houtai/src/pages/A6IDUser/index.tsx
  46. 8 5
      houtai/src/store/action/A6IDUser.ts
  47. 1 0
      houtai/src/types/api/A2Integral.ts
  48. 4 15
      houtai/src/types/api/A5Exchange.d.ts
  49. 0 0
      scene - 副本/.browserslistrc
  50. 0 0
      scene - 副本/.env
  51. 0 0
      scene - 副本/.env.bendi
  52. 0 0
      scene - 副本/.eslintrc.js
  53. 0 0
      scene - 副本/.gitignore
  54. 0 0
      scene - 副本/README.md
  55. 0 0
      scene - 副本/babel.config.js
  56. 0 0
      scene - 副本/package-lock.json
  57. 0 0
      scene - 副本/package.json
  58. 0 0
      scene - 副本/public/code.png
  59. 0 0
      scene - 副本/public/index.html
  60. 0 0
      scene - 副本/public/static/css/cropper.min.css
  61. 0 0
      scene - 副本/public/static/css/css/cropper.min.css
  62. 0 0
      scene - 副本/public/static/css/css/diyUpload.css
  63. 0 0
      scene - 副本/public/static/css/css/font/FZ_GBK.ttf
  64. 0 0
      scene - 副本/public/static/css/css/font/fontawesome-webfont.eot
  65. 0 0
      scene - 副本/public/static/css/css/font/fontawesome-webfont.svg
  66. 0 0
      scene - 副本/public/static/css/css/font/fontawesome-webfont.ttf
  67. 0 0
      scene - 副本/public/static/css/css/font/fontawesome-webfont.woff
  68. 0 0
      scene - 副本/public/static/css/css/font/fontawesome-webfont.woff2
  69. 0 0
      scene - 副本/public/static/css/css/font/mp-font.ttf
  70. 0 0
      scene - 副本/public/static/css/css/font/open-sans-light/OpenSansLight.woff2
  71. 0 0
      scene - 副本/public/static/css/css/font/open-sans-semibold/OpenSansSemibold.woff2
  72. 0 0
      scene - 副本/public/static/css/css/font/open-sans/OpenSansRegular.woff2
  73. 0 0
      scene - 副本/public/static/css/css/main.css
  74. 0 0
      scene - 副本/public/static/css/css/oldVer/font-awesome.min.css
  75. 0 0
      scene - 副本/public/static/css/css/oldVer/main.css.bak
  76. 1 1
      scene - 离线版/public/static/css/css/oldVer/main0.css
  77. 0 0
      scene - 副本/public/static/css/css/oldVer/main0.css.bak
  78. 0 0
      scene - 副本/public/static/css/css/oldVer/video-js.css
  79. 0 0
      scene - 副本/public/static/css/css/popupwindow.css
  80. 0 0
      scene - 副本/public/static/css/css/sceen2.css
  81. 0 0
      scene - 副本/public/static/css/css/toolBox.css
  82. 0 0
      scene - 副本/public/static/css/diyUpload.css
  83. 0 0
      scene - 副本/public/static/css/font/FZ_GBK.ttf
  84. 0 0
      scene - 副本/public/static/css/font/fontawesome-webfont.eot
  85. 0 0
      scene - 副本/public/static/css/font/fontawesome-webfont.svg
  86. 0 0
      scene - 副本/public/static/css/font/fontawesome-webfont.ttf
  87. 0 0
      scene - 副本/public/static/css/font/fontawesome-webfont.woff
  88. 0 0
      scene - 副本/public/static/css/font/fontawesome-webfont.woff2
  89. 0 0
      scene - 副本/public/static/css/font/mp-font.ttf
  90. 0 0
      scene - 副本/public/static/css/font/open-sans-light/OpenSansLight.woff2
  91. 0 0
      scene - 副本/public/static/css/font/open-sans-semibold/OpenSansSemibold.woff2
  92. 0 0
      scene - 副本/public/static/css/font/open-sans/OpenSansRegular.woff2
  93. 0 0
      scene - 副本/public/static/css/lzb.css
  94. 0 0
      scene - 副本/public/static/css/main.css
  95. 0 0
      scene - 副本/public/static/css/oldVer/font-awesome.min.css
  96. 0 0
      scene - 副本/public/static/css/oldVer/main.css.bak
  97. 0 0
      scene - 副本/public/static/css/oldVer/main0.css
  98. 0 0
      scene - 副本/public/static/css/oldVer/main0.css.bak
  99. 0 0
      scene - 副本/public/static/css/oldVer/video-js.css
  100. 0 0
      scene - 离线版/public/static/css/css/popupwindow.css

scene - 离线版/.browserslistrc → hot - 副本/.browserslistrc


scene - 离线版/.eslintrc.js → hot - 副本/.eslintrc.js


hot - 离线版/.gitignore → hot - 副本/.gitignore


hot - 离线版/README.md → hot - 副本/README.md


scene - 离线版/babel.config.js → hot - 副本/babel.config.js


hot - 离线版/package-lock.json → hot - 副本/package-lock.json


hot - 离线版/package.json → hot - 副本/package.json


hot - 离线版/public/index.html → hot - 副本/public/index.html


hot - 离线版/src/App.vue → hot - 副本/src/App.vue


hot - 离线版/src/assets/base.css → hot - 副本/src/assets/base.css


hot - 离线版/src/assets/images/IMGerror.png → hot - 副本/src/assets/images/IMGerror.png


hot - 离线版/src/assets/images/loading.gif → hot - 副本/src/assets/images/loading.gif


hot - 离线版/src/assets/images/pc/audio.png → hot - 副本/src/assets/images/pc/audio.png


hot - 离线版/src/assets/images/pc/audioAc.png → hot - 副本/src/assets/images/pc/audioAc.png


hot - 离线版/src/assets/images/pc/icon-left.png → hot - 副本/src/assets/images/pc/icon-left.png


hot - 离线版/src/assets/images/pc/icon-right.png → hot - 副本/src/assets/images/pc/icon-right.png


hot - 离线版/src/assets/images/pc/icon1.png → hot - 副本/src/assets/images/pc/icon1.png


hot - 离线版/src/assets/images/pc/icon1Ac.png → hot - 副本/src/assets/images/pc/icon1Ac.png


hot - 离线版/src/assets/images/pc/icon2.png → hot - 副本/src/assets/images/pc/icon2.png


hot - 离线版/src/assets/images/pc/icon2Ac.png → hot - 副本/src/assets/images/pc/icon2Ac.png


hot - 离线版/src/assets/images/pc/icon3.png → hot - 副本/src/assets/images/pc/icon3.png


hot - 离线版/src/assets/images/pc/icon3Ac.png → hot - 副本/src/assets/images/pc/icon3Ac.png


hot - 离线版/src/assets/images/pc/left.png → hot - 副本/src/assets/images/pc/left.png


hot - 离线版/src/assets/images/pc/right.png → hot - 副本/src/assets/images/pc/right.png


hot - 离线版/src/assets/logo.png → hot - 副本/src/assets/logo.png


hot - 离线版/src/components/HelloWorld.vue → hot - 副本/src/components/HelloWorld.vue


hot - 离线版/src/main.js → hot - 副本/src/main.js


hot - 离线版/src/router/index.js → hot - 副本/src/router/index.js


hot - 离线版/src/utils/browser.js → hot - 副本/src/utils/browser.js


hot - 离线版/src/utils/http.js → hot - 副本/src/utils/http.js


hot - 离线版/src/views/About.vue → hot - 副本/src/views/About.vue


+ 4 - 5
hot - 离线版/src/views/Home.vue

@@ -43,7 +43,7 @@
             </div>
             </div>
             <!-- 视频页面 -->
             <!-- 视频页面 -->
             <div class="videoBox" v-else-if="myType === 'video'">
             <div class="videoBox" v-else-if="myType === 'video'">
-              <video id="videoID" controls :src="urlToFitFu(item.url)" v-if="index === myInd"></video>
+              <video id="videoID" controls :src="urlToFitFu(item.url)" v-if="index === myInd" autoplay></video>
             </div>
             </div>
             <!-- 图片页面 -->
             <!-- 图片页面 -->
             <div class="imgBox" v-else-if="myType === 'img'">
             <div class="imgBox" v-else-if="myType === 'img'">
@@ -157,6 +157,7 @@ export default {
         return url.replace("http://super.4dage.com", "");
         return url.replace("http://super.4dage.com", "");
       } else return resUrl;
       } else return resUrl;
     },
     },
+
     // 点击左右箭头
     // 点击左右箭头
     cutMyInd(num, flag) {
     cutMyInd(num, flag) {
       if (flag) return;
       if (flag) return;
@@ -170,9 +171,7 @@ export default {
     },
     },
     async getData() {
     async getData() {
       // https://www.4dmodel.com/
       // https://www.4dmodel.com/
-      // let url = `https://super.4dage.com/data/${
-      let url = `/data/${
-        this.id
+      let url = `/data/${this.id
         }/hot/js/data.js?time=${Math.random()}`;
         }/hot/js/data.js?time=${Math.random()}`;
       let result = (await this.$http.get(url)).data;
       let result = (await this.$http.get(url)).data;
       const resData = result[this.m];
       const resData = result[this.m];
@@ -230,7 +229,7 @@ export default {
       const videoIDDom = document.getElementById('videoID')
       const videoIDDom = document.getElementById('videoID')
       videoIDDom.addEventListener('ended', () => {
       videoIDDom.addEventListener('ended', () => {
         console.log('视频观看完成', window, window.parent, window.parent.window, window.parent.window.parent.window)
         console.log('视频观看完成', window, window.parent, window.parent.window, window.parent.window.parent.window)
-        if(window.parent && window.parent.window.parent.window && window.parent.window.parent.window.addScoreFu){
+        if (window.parent && window.parent.window.parent.window && window.parent.window.parent.window.addScoreFu) {
           window.parent.window.parent.window.addScoreFu('观看视频')
           window.parent.window.parent.window.addScoreFu('观看视频')
         }
         }
       })
       })

hot - 离线版/vue.config.js → hot - 副本/vue.config.js


+ 1 - 1
hot/src/views/Home.vue

@@ -43,7 +43,7 @@
             </div>
             </div>
             <!-- 视频页面 -->
             <!-- 视频页面 -->
             <div class="videoBox" v-else-if="myType === 'video'">
             <div class="videoBox" v-else-if="myType === 'video'">
-              <video id="videoID" controls :src="item.url" v-if="index === myInd"></video>
+              <video id="videoID" controls :src="item.url" v-if="index === myInd" autoplay></video>
             </div>
             </div>
             <!-- 图片页面 -->
             <!-- 图片页面 -->
             <div class="imgBox" v-else-if="myType === 'img'">
             <div class="imgBox" v-else-if="myType === 'img'">

+ 1 - 1
houtai/src/components/Z_RichText/index.tsx

@@ -196,7 +196,7 @@ function RichText({ check, dirCode, isLook, myUrl }: Props, ref: any) {
           check && isTxtFlag ? "noUpThumbAc" : ""
           check && isTxtFlag ? "noUpThumbAc" : ""
         )}
         )}
       >
       >
-        请输入正文!
+        {/* 请输入正文! */}
       </div>
       </div>
     </div>
     </div>
   );
   );

+ 6 - 6
houtai/src/pages/A1Rule/RuleEdit/index.tsx

@@ -61,10 +61,10 @@ function RuleEdit({ id, closePage, upTableList, editMode }: Props) {
       // 富文本 为空
       // 富文本 为空
       const { val, flag } = richTxtRef.current.fatherBtnOkFu();
       const { val, flag } = richTxtRef.current.fatherBtnOkFu();
       // console.log("富文本", val, flag);
       // console.log("富文本", val, flag);
-      if (flag) {
-        MessageFu.error("游戏规则不能为空");
-        return;
-      }
+      // if (flag) {
+      //   MessageFu.error("游戏规则不能为空");
+      //   return;
+      // }
 
 
       if(values.second > 300) {
       if(values.second > 300) {
         MessageFu.error("时限不能大于300s");
         MessageFu.error("时限不能大于300s");
@@ -186,8 +186,8 @@ function RuleEdit({ id, closePage, upTableList, editMode }: Props) {
 
 
               <Form.Item name="gameRule">
               <Form.Item name="gameRule">
                 <div style={{ marginLeft: "0%", display: "flex" }}>
                 <div style={{ marginLeft: "0%", display: "flex" }}>
-                  <span style={{ marginRight: "2px", color: "red" }}>*</span>
-                  <div>游戏规则:</div>
+                  {/* <span style={{ marginRight: "2px", color: "red" }}>*</span> */}
+                  <div style={{ marginLeft: "10px" }}>游戏规则:</div>
                 </div>
                 </div>
                 <div style={{ marginLeft: "8%" }}>
                 <div style={{ marginLeft: "8%" }}>
                   <RichText
                   <RichText

+ 9 - 5
houtai/src/pages/A1Rule/TopicSetting/index.tsx

@@ -61,6 +61,7 @@ function TopicSetting({ closeFu }: Props) {
   const paginationChange = (pageNum: number, pageSize: number) => {
   const paginationChange = (pageNum: number, pageSize: number) => {
     pageNumRef.current = pageNum;
     pageNumRef.current = pageNum;
     pagePageRef.current = pageSize;
     pagePageRef.current = pageSize;
+    console.log("减少会触发吗?");
     setTableSelect({ ...tableSelect, pageNum, pageSize });
     setTableSelect({ ...tableSelect, pageNum, pageSize });
   };
   };
 
 
@@ -245,15 +246,21 @@ function TopicSetting({ closeFu }: Props) {
           return item.id !== id;
           return item.id !== id;
         });
         });
         setEditShowData([...newList]);
         setEditShowData([...newList]);
+        if (newList.length % pagePageRef.current === 0) {
+          paginationChange(pageNumRef.current - 1, pagePageRef.current);
+        }
       } else {
       } else {
         setDelTopicIdList([...delTopicIdList, id]);
         setDelTopicIdList([...delTopicIdList, id]);
         let newList = editShowData.filter((item: any) => {
         let newList = editShowData.filter((item: any) => {
           return item.id !== id;
           return item.id !== id;
         });
         });
         setEditShowData([...newList]);
         setEditShowData([...newList]);
+        if (newList.length % pagePageRef.current === 0) {
+          paginationChange(pageNumRef.current - 1, pagePageRef.current);
+        }
       }
       }
     },
     },
-    [delTopicIdList, editShowData]
+    [delTopicIdList, editShowData, paginationChange]
   );
   );
 
 
   const FormBoxRef = useRef<FormInstance>(null);
   const FormBoxRef = useRef<FormInstance>(null);
@@ -265,7 +272,6 @@ function TopicSetting({ closeFu }: Props) {
         title: "序号",
         title: "序号",
         render: (text: any, record: any, index: any) =>
         render: (text: any, record: any, index: any) =>
           index + 1 + (pageNumRef.current - 1) * pagePageRef.current,
           index + 1 + (pageNumRef.current - 1) * pagePageRef.current,
-        // index,
       },
       },
       {
       {
         title: "题目描述",
         title: "题目描述",
@@ -634,9 +640,7 @@ function TopicSetting({ closeFu }: Props) {
               initialValue={curEdit ? curEdit.value : ""}
               initialValue={curEdit ? curEdit.value : ""}
               style={{ marginTop: "40px" }}
               style={{ marginTop: "40px" }}
               hide-required-asterisk={true}
               hide-required-asterisk={true}
-              getValueFromEvent={(e) =>
-                e.target.value.replace(" ", "")
-              }
+              getValueFromEvent={(e) => e.target.value.replace(" ", "")}
             >
             >
               <Input
               <Input
                 placeholder="请输入"
                 placeholder="请输入"

+ 9 - 4
houtai/src/pages/A1Rule/index.module.scss

@@ -3,14 +3,15 @@
   height: 100%;
   height: 100%;
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
-  background-color: rgb(239, 239, 239);
+  background-color: rgb(255, 255, 255);
+  overflow: auto;
 
 
   :global {
   :global {
     .ruleTop {
     .ruleTop {
       border-radius: 4px;
       border-radius: 4px;
       padding: 15px 20px 10px 20px;
       padding: 15px 20px 10px 20px;
       background-color: #fff;
       background-color: #fff;
-      box-shadow: 3px 0px 10px 0px #d5d5d9;
+      // box-shadow: 3px 0px 10px 0px #d5d5d9;
       position: relative;
       position: relative;
 
 
       .pageTitle {
       .pageTitle {
@@ -18,6 +19,10 @@
           width: 100px;
           width: 100px;
           height: 40px;
           height: 40px;
         }
         }
+        span{
+          font-size: 12px;
+          color: #a1a1a5;
+        }
       }
       }
 
 
       .scoreLimitBtn {
       .scoreLimitBtn {
@@ -53,7 +58,7 @@
 
 
 
 
         .ant-table-body {
         .ant-table-body {
-          height: 200px;
+          height: 40vh;
           overflow-y: auto !important;
           overflow-y: auto !important;
           overflow-y: overlay !important;
           overflow-y: overlay !important;
 
 
@@ -80,7 +85,7 @@
         // box-shadow: 3px 0px 10px 0px #d5d5d9;
         // box-shadow: 3px 0px 10px 0px #d5d5d9;
 
 
         .ant-table-body {
         .ant-table-body {
-          height: 200px;
+          height: 15vh;
           overflow-y: auto !important;
           overflow-y: auto !important;
           overflow-y: overlay !important;
           overflow-y: overlay !important;
 
 

+ 180 - 29
houtai/src/pages/A1Rule/index.tsx

@@ -6,7 +6,17 @@ import React, {
   useState,
   useState,
 } from "react";
 } from "react";
 import styles from "./index.module.scss";
 import styles from "./index.module.scss";
-import { Button, Form, Input, Modal, Popconfirm, Table } from "antd";
+import {
+  Button,
+  Form,
+  Input,
+  Modal,
+  Popconfirm,
+  Radio,
+  RadioChangeEvent,
+  Select,
+  Table,
+} from "antd";
 import { useDispatch, useSelector } from "react-redux";
 import { useDispatch, useSelector } from "react-redux";
 import { RootState } from "@/store";
 import { RootState } from "@/store";
 import { RulesTableType } from "@/types";
 import { RulesTableType } from "@/types";
@@ -36,6 +46,31 @@ function A1Rule() {
 
 
   const [surScoreLimit, setSurScoreLimit] = useState({} as any);
   const [surScoreLimit, setSurScoreLimit] = useState({} as any);
 
 
+  const addMonths = useCallback((date: any, months: string) => {
+    // 复制传入的日期对象以避免修改原始对象
+    var result = new Date(date.getTime());
+    console.log(timestampToDate(result));
+
+    // 增加月份,同时处理由于增加月份可能导致的日期溢出问题
+    result.setDate(result.getDate() + parseInt(months));
+
+    // // 如果日期溢出(比如2月29日加上1个月),则手动调整到正确的最后一天
+    // if (result.getDate() < date.getDate()) {
+    //   result.setDate(0);
+    // }
+
+    return result;
+  }, []);
+
+  const changeClearMonth = useCallback(
+    (e: any) => {
+      // @ts-ignore
+      setNewDate(timestampToDate(addMonths(new Date(), e.target.value)));
+      setClearMonth(e.target.value);
+    },
+    [addMonths]
+  );
+
   const getList = useCallback(async () => {
   const getList = useCallback(async () => {
     dispatch(getRuleAPI("game"));
     dispatch(getRuleAPI("game"));
     const onlineRes = await getOnlineRuleAPI("online");
     const onlineRes = await getOnlineRuleAPI("online");
@@ -45,9 +80,13 @@ function A1Rule() {
     const res = await getScoreLimitAPI(1);
     const res = await getScoreLimitAPI(1);
     if (res.code === 0) {
     if (res.code === 0) {
       setSurScoreLimit(res.data);
       setSurScoreLimit(res.data);
-      // alert(res.data)
+      let resetScoreData = JSON.parse(res.data.description);
+      console.log(resetScoreData);
+      setIsClear(resetScoreData.hasReset ? 1 : 2);
+      setClearMonth(resetScoreData.period);
+      changeClearMonth({ target: { value: resetScoreData.period } });
     }
     }
-  }, [dispatch]);
+  }, [changeClearMonth, dispatch]);
 
 
   // 积分上限窗口开关
   // 积分上限窗口开关
   const [limitScoreShow, setLimitScoreShow] = useState(false);
   const [limitScoreShow, setLimitScoreShow] = useState(false);
@@ -56,26 +95,70 @@ function A1Rule() {
   const editId = useRef(0);
   const editId = useRef(0);
   // 编辑模式 1是游戏规则 2是线上展厅
   // 编辑模式 1是游戏规则 2是线上展厅
   const editMode = useRef(1);
   const editMode = useRef(1);
-  const openEditPageFu = useCallback(
-    (type: number, id: number) => {
-      // alert('编辑2')
-      editMode.current = type;
-      editId.current = id;
-      setEditPageShow(true);
-      // console.log(editPageShow, editMode.current);
-    },
-    [editPageShow]
-  );
+  const openEditPageFu = useCallback((type: number, id: number) => {
+    // alert('编辑2')
+    editMode.current = type;
+    editId.current = id;
+    setEditPageShow(true);
+    // console.log(editPageShow, editMode.current);
+  }, []);
+
+  // 积分是否清除相关
+  const [isClear, setIsClear] = useState(2);
+  const onChange = (e: RadioChangeEvent) => {
+    // 从转换成是
+    if (e.target.value === 1 && clearMonth === "null") {
+      setClearMonth(undefined);
+    }
+    setIsClear(e.target.value);
+  };
+
+  const [clearMonth, setClearMonth] = useState(undefined);
+  const [newDate, setNewDate] = useState();
+
+  const timestampToDate = (timestamp: any) => {
+    var date = new Date(timestamp);
+    var year = date.getFullYear();
+    var month = ("0" + (date.getMonth() + 1)).slice(-2);
+    var day = ("0" + date.getDate()).slice(-2);
+
+    return year + "年" + month + "月" + day + "日";
+  };
+
+  function getFirstDayOfMonth() {
+    var now = new Date(); // 获取当前时间
+    var year = now.getFullYear(); // 获取当前年份
+    var month = now.getMonth(); // 获取当前月份(注意:月份从0开始,0表示一月)
+
+    return `${year}-${month + 1}-1 00:00:01`; // 返回时间戳
+  }
 
 
   const [form] = Form.useForm();
   const [form] = Form.useForm();
-  const [form2] = Form.useForm();
 
 
   const onFinish = useCallback(
   const onFinish = useCallback(
     async (values: any) => {
     async (values: any) => {
+      if (isClear === 1) {
+        if (!clearMonth) {
+          MessageFu.error("积分清零的日数不能为空!");
+          return;
+        }
+        if (clearMonth <= 0 || clearMonth > 301) {
+          MessageFu.error("积分清零的日数范围为1-300!");
+          return;
+        }
+      }
       if (values.numberVal) {
       if (values.numberVal) {
+        let desc = {
+          hasReset: isClear === 1 ? true : false,
+          createTime: isClear === 1 ? getFirstDayOfMonth() : "null",
+          period:
+            isClear === 1 ? parseInt(clearMonth ? clearMonth : "null") : "null",
+        };
+        console.log(desc);
         const data = {
         const data = {
           ...surScoreLimit,
           ...surScoreLimit,
           score: values.numberVal,
           score: values.numberVal,
+          description: JSON.stringify(desc),
         };
         };
         const res: any = await scoreLimitSaveAPI(data);
         const res: any = await scoreLimitSaveAPI(data);
         if (res.code === 0) {
         if (res.code === 0) {
@@ -85,7 +168,7 @@ function A1Rule() {
         }
         }
       }
       }
     },
     },
-    [getList, surScoreLimit]
+    [clearMonth, getList, isClear, surScoreLimit]
   );
   );
 
 
   const columns = useMemo(() => {
   const columns = useMemo(() => {
@@ -185,7 +268,9 @@ function A1Rule() {
     <>
     <>
       <div className={styles.A1Rule}>
       <div className={styles.A1Rule}>
         <div className="ruleTop">
         <div className="ruleTop">
-          <div className="pageTitle">游戏规则</div>
+          <div className="pageTitle">
+            游戏规则 <span>游戏规则需用户刷新浏览器后生效</span>
+          </div>
           <button
           <button
             className="scoreLimitBtn"
             className="scoreLimitBtn"
             onClick={() => {
             onClick={() => {
@@ -193,7 +278,8 @@ function A1Rule() {
               setLimitScoreShow(true);
               setLimitScoreShow(true);
             }}
             }}
           >
           >
-            单日可获得积分上限:<span>{surScoreLimit.score}</span>
+            {/* 单日可获得积分上限:<span>{surScoreLimit.score}</span> */}
+            其他规则设置
           </button>
           </button>
           {/* 表格主体 */}
           {/* 表格主体 */}
           <div className="tableBox1">
           <div className="tableBox1">
@@ -203,12 +289,7 @@ function A1Rule() {
               dataSource={tableInfo.list}
               dataSource={tableInfo.list}
               columns={columns}
               columns={columns}
               rowKey="id"
               rowKey="id"
-              pagination={{
-                showQuickJumper: true,
-                position: ["bottomCenter"],
-                showSizeChanger: true,
-                total: tableInfo.total,
-              }}
+              pagination={false}
             />
             />
           </div>
           </div>
         </div>
         </div>
@@ -222,12 +303,7 @@ function A1Rule() {
               dataSource={onlineTableInfo}
               dataSource={onlineTableInfo}
               columns={columns2}
               columns={columns2}
               rowKey="id"
               rowKey="id"
-              pagination={{
-                showQuickJumper: true,
-                position: ["bottomCenter"],
-                showSizeChanger: true,
-                total: tableInfo.total,
-              }}
+              pagination={false}
             />
             />
           </div>
           </div>
         </div>
         </div>
@@ -275,6 +351,80 @@ function A1Rule() {
                 placeholder="请输入正整数,不超过999999999"
                 placeholder="请输入正整数,不超过999999999"
               />
               />
             </Form.Item>
             </Form.Item>
+
+            <Form.Item
+              label="积分清零"
+              name="isClear"
+              style={{ marginTop: "40px" }}
+              initialValue={isClear}
+              rules={[{ required: true, message: "不能为空!" }]}
+              hide-required-asterisk={true}
+            >
+              <Radio.Group onChange={onChange} value={isClear}>
+                <Radio value={1}>是</Radio>
+                <Radio value={2}>否</Radio>
+              </Radio.Group>
+            </Form.Item>
+            {isClear === 1 ? (
+              <Form.Item
+                label=""
+                name="clearMonth"
+                style={{ marginTop: "-15px", marginLeft: "30%" }}
+                hide-required-asterisk={true}
+                getValueFromEvent={(e) =>
+                  e.target.value.replace(/^(0+)|[^\d]+/g, "")
+                }
+              >
+                <span style={{ color: "red", marginRight: "10px" }}>*</span>每
+                {/* <Select
+                  value={clearMonth}
+                  onChange={changeClearMonth}
+                  placeholder="请选择"
+                  options={[
+                    { value: "1", label: "1" },
+                    { value: "2", label: "2" },
+                    { value: "3", label: "3" },
+                    { value: "4", label: "4" },
+                    { value: "5", label: "5" },
+                    { value: "6", label: "6" },
+                    { value: "7", label: "7" },
+                    { value: "8", label: "8" },
+                    { value: "9", label: "9" },
+                    { value: "10", label: "10" },
+                    { value: "11", label: "11" },
+                    { value: "12", label: "12" },
+                  ]}
+                  style={{
+                    width: "130px",
+                    height: "30px",
+                    margin: "0 5px",
+                  }}
+                /> */}
+                <Input
+                  style={{
+                    width: "150px",
+                    height: "30px",
+                    margin: "0 5px",
+                  }}
+                  defaultValue={clearMonth}
+                  maxLength={3}
+                  onChange={changeClearMonth}
+                  placeholder="请选择数字,1-300"
+                />
+                个自然日清空一次
+                {clearMonth ? (
+                  <div
+                    style={{
+                      color: "gray",
+                      marginTop: "10px",
+                      marginLeft: "5%",
+                    }}
+                  >
+                    将在{newDate}清空积分
+                  </div>
+                ) : null}
+              </Form.Item>
+            ) : null}
             {/* 确定和取消按钮 */}
             {/* 确定和取消按钮 */}
             <br />
             <br />
             <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
             <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
@@ -288,6 +438,7 @@ function A1Rule() {
                 cancelText="取消"
                 cancelText="取消"
                 onConfirm={() => {
                 onConfirm={() => {
                   setLimitScoreShow(false);
                   setLimitScoreShow(false);
+                  getList();
                 }}
                 }}
                 okButtonProps={{ loading: false }}
                 okButtonProps={{ loading: false }}
               >
               >

+ 3 - 1
houtai/src/pages/A2Integral/index.tsx

@@ -118,7 +118,9 @@ function A2Integral() {
       {
       {
         title: "说明",
         title: "说明",
         render: (item: IntegralTableAPIType) => {
         render: (item: IntegralTableAPIType) => {
-          return <>{item.description}</>;
+          return (
+            <>{item.type === "奖品兑换" ? item.prizeName : item.description}</>
+          );
         },
         },
       },
       },
     ];
     ];

+ 1 - 17
houtai/src/pages/A3User/index.tsx

@@ -71,22 +71,6 @@ function A3User() {
     }, 100);
     }, 100);
   }, [getList, tableSelect]);
   }, [getList, tableSelect]);
 
 
-  // 用户昵称的输入
-  const nameTime = useRef(-1);
-  const nameChange = useCallback(
-    (e: React.ChangeEvent<HTMLInputElement>) => {
-      clearTimeout(nameTime.current);
-      nameTime.current = window.setTimeout(() => {
-        setTableSelect({
-          ...tableSelect,
-          nickName: e.target.value.trim(),
-          pageNum: 1,
-        });
-      }, 500);
-    },
-    [tableSelect]
-  );
-
   // 真实姓名的输入
   // 真实姓名的输入
   const realNameTime = useRef(-1);
   const realNameTime = useRef(-1);
   const realNameChange = useCallback(
   const realNameChange = useCallback(
@@ -233,7 +217,7 @@ function A3User() {
           ) : (
           ) : (
             <>
             <>
               <Popconfirm
               <Popconfirm
-                title="密码重置后为123456,是否重置?"
+                title="是否将密码重置为123456?"
                 okText="重置"
                 okText="重置"
                 cancelText="取消"
                 cancelText="取消"
                 onConfirm={() => resetPassFu(item.id!)}
                 onConfirm={() => resetPassFu(item.id!)}

+ 253 - 134
houtai/src/pages/A4Prize/index.tsx

@@ -30,7 +30,6 @@ import {
 } from "@/store/action/A4Prise";
 } from "@/store/action/A4Prise";
 import { MessageFu } from "@/utils/message";
 import { MessageFu } from "@/utils/message";
 import { RangePickerProps } from "antd/es/date-picker";
 import { RangePickerProps } from "antd/es/date-picker";
-import { RcFile } from "antd/es/upload";
 import RichText from "@/components/Z_RichText";
 import RichText from "@/components/Z_RichText";
 import moment from "moment";
 import moment from "moment";
 import UpFileOne from "@/components/Z_upFileOne";
 import UpFileOne from "@/components/Z_upFileOne";
@@ -82,7 +81,9 @@ function A4Prize() {
           setCover(res.data.thumb);
           setCover(res.data.thumb);
           setDirCode(res.data.id);
           setDirCode(res.data.id);
           // 调用富文本子组件的函数,回显数据
           // 调用富文本子组件的函数,回显数据
-          richTxtRef.current.ritxtShowFu(res.data.rtf);
+          if (res.data.name !== "公益合伙人证书") {
+            richTxtRef.current.ritxtShowFu(res.data.rtf);
+          }
         }
         }
       } else {
       } else {
         setModalType("add");
         setModalType("add");
@@ -149,6 +150,31 @@ function A4Prize() {
     [cover, curEditItem, form, getList, modalType]
     [cover, curEditItem, form, getList, modalType]
   );
   );
 
 
+  const onFinishForZhengShu = useCallback(
+    async (values: any) => {
+      if (values) {
+        setCheck(true);
+
+        const obj = {
+          ...values,
+          id: curEditItem && modalType !== "add" ? curEditItem.id : null,
+          thumb: curEditItem?.thumb,
+          rtf: curEditItem?.rtf,
+        };
+
+        const res: any = await editPrizeByIdAPI(obj);
+        if (res.code === 0) {
+          MessageFu.success("提交成功!");
+          getList();
+          setEditPageVisible(false);
+        }
+      }
+      form.resetFields();
+      setCover("");
+    },
+    [curEditItem, form, getList, modalType]
+  );
+
   const handleChange = (value: string) => {
   const handleChange = (value: string) => {
     // console.log(`selected ${value}`);
     // console.log(`selected ${value}`);
   };
   };
@@ -176,11 +202,17 @@ function A4Prize() {
       },
       },
       {
       {
         title: "库存",
         title: "库存",
-        dataIndex: "stock",
+        // dataIndex: "stock",
+        render: (item: PrizeTableType) => (
+          <div>{item.name === "公益合伙人证书" ? "-" : item.stock}</div>
+        ),
       },
       },
       {
       {
         title: "登记日期",
         title: "登记日期",
-        dataIndex: "updateTime",
+        // dataIndex: "updateTime",
+        render: (item: PrizeTableType) => (
+          <div>{item.name === "公益合伙人证书" ? "-" : item.updateTime}</div>
+        ),
       },
       },
       {
       {
         title: "状态",
         title: "状态",
@@ -191,7 +223,7 @@ function A4Prize() {
       {
       {
         title: "操作",
         title: "操作",
         render: (item: PrizeTableType) => {
         render: (item: PrizeTableType) => {
-          return (
+          return item.name !== "公益合伙人证书" ? (
             <>
             <>
               <Button
               <Button
                 size="small"
                 size="small"
@@ -215,6 +247,14 @@ function A4Prize() {
                 </Button>
                 </Button>
               </Popconfirm>
               </Popconfirm>
             </>
             </>
+          ) : (
+            <Button
+              size="small"
+              type="text"
+              onClick={() => openEditPageFu(item.id)}
+            >
+              编辑
+            </Button>
           );
           );
         },
         },
       },
       },
@@ -280,141 +320,220 @@ function A4Prize() {
           />
           />
         </div>
         </div>
       </div>
       </div>
-      {/* 编辑/新增弹窗 */}
-      <Modal
-        destroyOnClose
-        closable={false}
-        maskClosable={false}
-        open={editPageVisible}
-        title={modalType === "add" ? "新增奖品" : "编辑奖品"}
-        width={1000}
-        onCancel={() => setEditPageVisible(false)}
-        footer={
-          [] // 设置footer为空,去掉 取消 确定默认按钮
-        }
-      >
-        <Form
-          form={form}
-          ref={FormBoxRef}
-          name="basic"
-          labelCol={{ span: 3 }}
-          onFinish={onFinish}
-          onFinishFailed={onFinishFailed}
-          autoComplete="off"
+      {curEditItem?.name === "公益合伙人证书" && modalType === "edit" ? (
+        <Modal
+          destroyOnClose
+          closable={false}
+          maskClosable={false}
+          open={editPageVisible}
+          title={"编辑奖品"}
+          width={1000}
+          onCancel={() => setEditPageVisible(false)}
+          footer={
+            [] // 设置footer为空,去掉 取消 确定默认按钮
+          }
         >
         >
-          <Form.Item
-            label="奖品名称"
-            name="name"
-            rules={[{ required: true, message: "不能为空!" }]}
-          >
-            <Input maxLength={20} placeholder="请输入内容,不超过20个字" />
-          </Form.Item>
-          <Form.Item
-            label="所需的积分"
-            name="score"
-            rules={[{ required: true, message: "不能为空!" }]}
-            getValueFromEvent={(e) =>
-              e.target.value.replace(/^(0+)|[^\d]+/g, "")
-            }
-          >
-            <Input maxLength={5} placeholder="请输入正整数,1-99999" />
-          </Form.Item>
-          <Form.Item
-            label="库存"
-            name="stock"
-            rules={[{ required: true, message: "不能为空!" }]}
-            getValueFromEvent={(e) =>
-              e.target.value.replace(/^(0+)|[^\d]+/g, "")
-            }
-          >
-            <Input maxLength={5} placeholder="请输入正整数,1-99999" />
-          </Form.Item>
-          <Form.Item
-            label="登记日期"
-            name="date"
-            initialValue={moment() as any}
-            rules={[{ required: true, message: "不能为空!" }]}
+          <Form
+            form={form}
+            ref={FormBoxRef}
+            name="basic"
+            labelCol={{ span: 3 }}
+            onFinish={onFinishForZhengShu}
+            onFinishFailed={onFinishFailed}
+            autoComplete="off"
           >
           >
-            <DatePicker showTime onChange={onChange} onOk={onOk} />
-          </Form.Item>
-          <Form.Item
-            label="状态"
-            name="isEnabled"
-            initialValue={curEditItem ? (curEditItem.stock > 0 ? 1 : 0) : 1}
-            rules={[{ required: true, message: "不能为空!" }]}
-          >
-            <Select
-              defaultValue={"上架"}
-              style={{ width: 120 }}
-              onChange={handleChange}
-              options={[
-                { value: 1, label: "上架" },
-                { value: 0, label: "下架" },
-              ]}
-            />
-          </Form.Item>
-          <Form.Item name="themb" initialValue={cover ? cover : ""}>
-            <div style={{ marginLeft: "7%", display: "flex" }}>
-              <span style={{ marginRight: "2px", color: "red" }}>*</span>
-              <div>封面:</div>
-            </div>
-            <div style={{ marginLeft: "14%" }}>
-              <UpFileOne
-                myUrl="cms/prize/upload"
-                cover={cover}
-                setCover={(val) => {
-                  setCover(val);
+            <Form.Item
+              label="奖品名称"
+              name="name"
+              rules={[{ required: true, message: "不能为空!" }]}
+            >
+              {curEditItem.name}
+            </Form.Item>
+            <Form.Item
+              label="所需的积分"
+              name="score"
+              rules={[{ required: true, message: "不能为空!" }]}
+              getValueFromEvent={(e) =>
+                e.target.value.replace(/^(0+)|[^\d]+/g, "")
+              }
+            >
+              <Input maxLength={5} placeholder="请输入正整数,1-99999" />
+            </Form.Item>
+            <Form.Item
+              label="状态"
+              name="isEnabled"
+              initialValue={curEditItem ? (curEditItem.stock > 0 ? 1 : 0) : 1}
+              rules={[{ required: true, message: "不能为空!" }]}
+            >
+              <Select
+                defaultValue={"上架"}
+                style={{ width: 120 }}
+                onChange={handleChange}
+                options={[
+                  { value: 1, label: "上架" },
+                  { value: 0, label: "下架" },
+                ]}
+              />
+            </Form.Item>
+            {/* 确定和取消按钮 */}
+            <br />
+            <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
+              <Button type="primary" htmlType="submit">
+                提交
+              </Button>
+              &emsp;
+              <Popconfirm
+                title="放弃编辑后,信息将不会保存!"
+                okText="放弃"
+                cancelText="取消"
+                onConfirm={() => {
+                  setEditPageVisible(false);
+                  form.resetFields();
+                  setCover("");
                 }}
                 }}
-                isLook={false}
-                coverCheck={check}
-                size={5}
-                dirCode={dirCode}
-                checkTxt="请上传图片!"
+                okButtonProps={{ loading: false }}
+              >
+                <Button>取消</Button>
+              </Popconfirm>
+            </Form.Item>
+          </Form>
+        </Modal>
+      ) : (
+        <Modal
+          destroyOnClose
+          closable={false}
+          maskClosable={false}
+          open={editPageVisible}
+          title={modalType === "add" ? "新增奖品" : "编辑奖品"}
+          width={1000}
+          onCancel={() => setEditPageVisible(false)}
+          footer={
+            [] // 设置footer为空,去掉 取消 确定默认按钮
+          }
+        >
+          <Form
+            form={form}
+            ref={FormBoxRef}
+            name="basic"
+            labelCol={{ span: 3 }}
+            onFinish={onFinish}
+            onFinishFailed={onFinishFailed}
+            autoComplete="off"
+          >
+            <Form.Item
+              label="奖品名称"
+              name="name"
+              rules={[{ required: true, message: "不能为空!" }]}
+            >
+              <Input maxLength={20} placeholder="请输入内容,不超过20个字" />
+            </Form.Item>
+            <Form.Item
+              label="所需的积分"
+              name="score"
+              rules={[{ required: true, message: "不能为空!" }]}
+              getValueFromEvent={(e) =>
+                e.target.value.replace(/^(0+)|[^\d]+/g, "")
+              }
+            >
+              <Input maxLength={5} placeholder="请输入正整数,1-99999" />
+            </Form.Item>
+            <Form.Item
+              label="库存"
+              name="stock"
+              rules={[{ required: true, message: "不能为空!" }]}
+              getValueFromEvent={(e) =>
+                e.target.value.replace(/^(0+)|[^\d]+/g, "")
+              }
+            >
+              <Input maxLength={5} placeholder="请输入正整数,1-99999" />
+            </Form.Item>
+            <Form.Item
+              label="登记日期"
+              name="date"
+              initialValue={moment() as any}
+              rules={[{ required: true, message: "不能为空!" }]}
+            >
+              <DatePicker showTime onChange={onChange} onOk={onOk} />
+            </Form.Item>
+            <Form.Item
+              label="状态"
+              name="isEnabled"
+              initialValue={curEditItem ? (curEditItem.stock > 0 ? 1 : 0) : 1}
+              rules={[{ required: true, message: "不能为空!" }]}
+            >
+              <Select
+                defaultValue={"上架"}
+                style={{ width: 120 }}
+                onChange={handleChange}
+                options={[
+                  { value: 1, label: "上架" },
+                  { value: 0, label: "下架" },
+                ]}
               />
               />
-            </div>
+            </Form.Item>
+            <Form.Item name="themb" initialValue={cover ? cover : ""}>
+              <div style={{ marginLeft: "7%", display: "flex" }}>
+                <span style={{ marginRight: "2px", color: "red" }}>*</span>
+                <div>封面:</div>
+              </div>
+              <div style={{ marginLeft: "14%" }}>
+                <UpFileOne
+                  myUrl="cms/prize/upload"
+                  cover={cover}
+                  setCover={(val) => {
+                    setCover(val);
+                  }}
+                  isLook={false}
+                  coverCheck={check}
+                  size={2}
+                  dirCode={dirCode}
+                  checkTxt="请上传图片!"
+                />
+              </div>
 
 
-            <span style={{ marginLeft: "14%" }}>
+              {/* <span style={{ marginLeft: "14%" }}>
               格式要求:支持png、jpg和jpeg的图片格式;最大支持2M;最多1张
               格式要求:支持png、jpg和jpeg的图片格式;最大支持2M;最多1张
-            </span>
-          </Form.Item>
-          <Form.Item name="introduction">
-            <div style={{ marginLeft: "4%", display: "flex" }}>
-              <span style={{ marginRight: "2px", color: "red" }}>*</span>
-              <div>产品简介:</div>
-            </div>
-            <div style={{ marginLeft: "12%" }}>
-              <RichText
-                myUrl="cms/prize/upload"
-                ref={richTxtRef}
-                check={check}
-                dirCode={dirCode}
-                isLook={false}
-              />
-            </div>
-          </Form.Item>
-          {/* 确定和取消按钮 */}
-          <br />
-          <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
-            <Button type="primary" htmlType="submit">
-              提交
-            </Button>
-            &emsp;
-            <Popconfirm
-              title="放弃编辑后,信息将不会保存!"
-              okText="放弃"
-              cancelText="取消"
-              onConfirm={() => {
-                setEditPageVisible(false);
-                form.resetFields();
-                setCover("");
-              }}
-              okButtonProps={{ loading: false }}
-            >
-              <Button>取消</Button>
-            </Popconfirm>
-          </Form.Item>
-        </Form>
-      </Modal>
+            </span> */}
+            </Form.Item>
+            <Form.Item name="introduction">
+              <div style={{ marginLeft: "4%", display: "flex" }}>
+                <span style={{ marginRight: "2px", color: "red" }}>*</span>
+                <div>产品简介:</div>
+              </div>
+              <div style={{ marginLeft: "12%" }}>
+                <RichText
+                  myUrl="cms/prize/upload"
+                  ref={richTxtRef}
+                  check={check}
+                  dirCode={dirCode}
+                  isLook={false}
+                />
+              </div>
+            </Form.Item>
+            {/* 确定和取消按钮 */}
+            <br />
+            <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
+              <Button type="primary" htmlType="submit">
+                提交
+              </Button>
+              &emsp;
+              <Popconfirm
+                title="放弃编辑后,信息将不会保存!"
+                okText="放弃"
+                cancelText="取消"
+                onConfirm={() => {
+                  setEditPageVisible(false);
+                  form.resetFields();
+                  setCover("");
+                }}
+                okButtonProps={{ loading: false }}
+              >
+                <Button>取消</Button>
+              </Popconfirm>
+            </Form.Item>
+          </Form>
+        </Modal>
+      )}
     </div>
     </div>
   );
   );
 }
 }

+ 14 - 3
houtai/src/pages/A5Exchange/index.tsx

@@ -5,6 +5,7 @@ import { useDispatch, useSelector } from "react-redux";
 
 
 import styles from "./index.module.scss";
 import styles from "./index.module.scss";
 import { getExchangeListAPI } from "@/store/action/A5Exchange";
 import { getExchangeListAPI } from "@/store/action/A5Exchange";
+import { ExchangeTableType } from "@/types";
 
 
 const { RangePicker } = DatePicker;
 const { RangePicker } = DatePicker;
 
 
@@ -97,15 +98,25 @@ function A5Exchange() {
       },
       },
       {
       {
         title: "称呼",
         title: "称呼",
-        dataIndex: "name",
+        render: (item: ExchangeTableType) => (
+          <div>{item.prizeName === "公益合伙人证书" || item.name === "" ? "-" : item.name}</div>
+        ),
       },
       },
       {
       {
         title: "联系方式",
         title: "联系方式",
-        dataIndex: "phone",
+        render: (item: ExchangeTableType) => (
+          <div>{item.prizeName === "公益合伙人证书" || item.phone === "" ? "-" : item.phone}</div>
+        ),
       },
       },
       {
       {
         title: "地址和留言",
         title: "地址和留言",
-        dataIndex: "description",
+        render: (item: ExchangeTableType) => (
+          <div>
+            {item.prizeName === "公益合伙人证书" || item.description === ""
+              ? "-"
+              : item.description}
+          </div>
+        ),
       },
       },
     ];
     ];
   }, []);
   }, []);

+ 29 - 3
houtai/src/pages/A6IDUser/IntegralEdit/index.tsx

@@ -13,6 +13,7 @@ import {
   IDUserScoreSaveAPI,
   IDUserScoreSaveAPI,
   getIDUserInfoByIdAPI,
   getIDUserInfoByIdAPI,
   getIDUserListAPI,
   getIDUserListAPI,
+  getIDUserListAPI2,
 } from "@/store/action/A6IDUser";
 } from "@/store/action/A6IDUser";
 import { IDUserTableType, IDUserType, SaveIDUserScoreType } from "@/types";
 import { IDUserTableType, IDUserType, SaveIDUserScoreType } from "@/types";
 import { MessageFu } from "@/utils/message";
 import { MessageFu } from "@/utils/message";
@@ -44,6 +45,21 @@ function IntegralEdit({ currentItem, closeFu }: Props) {
     if (res.code === 0) {
     if (res.code === 0) {
       setResults(res.data);
       setResults(res.data);
     }
     }
+
+    const ress = await getIDUserListAPI2({
+      pageNum: 0,
+      pageSize: 9999999,
+      searchKey: "",
+    });
+    if (ress.code === 0) {
+      const curItem = ress.data.records.find((item: any) => {
+        return item.id === currentItem.id;
+      });
+      console.log('当前',ress.data.record)
+      if (curItem) {
+        setCurrentItemShow(curItem);
+      }
+    }
   }, [currentItem.id]);
   }, [currentItem.id]);
 
 
   const [currentItemShow, setCurrentItemShow] = useState<IDUserTableType>();
   const [currentItemShow, setCurrentItemShow] = useState<IDUserTableType>();
@@ -96,21 +112,31 @@ function IntegralEdit({ currentItem, closeFu }: Props) {
         const res: any = await IDUserScoreSaveAPI({
         const res: any = await IDUserScoreSaveAPI({
           description: values.description,
           description: values.description,
           userId: currentItem.id,
           userId: currentItem.id,
-          score:  encodeStr(Base64.encode(values.score)),
+          score: encodeStr(Base64.encode(values.score)),
           type: "编辑",
           type: "编辑",
         });
         });
         if (res.code === 0) {
         if (res.code === 0) {
           MessageFu.success("提交成功!");
           MessageFu.success("提交成功!");
           pageNumRef.current = tableSelect.pageNum;
           pageNumRef.current = tableSelect.pageNum;
           pagePageRef.current = tableSelect.pageSize;
           pagePageRef.current = tableSelect.pageSize;
+          console.log(
+            "积分计算",
+            Number(currentItem.score) + Number(values.score),
+            Number(currentItem.score),
+            Number(values.score),
+            resultss
+          );
           getInfoById();
           getInfoById();
           dispatch(getIDUserListAPI(tableSelect));
           dispatch(getIDUserListAPI(tableSelect));
-          setCurrentItemShow({...currentItem,score: Number(currentItem.score) + Number(values.score)});
+          // setCurrentItemShow({
+          //   ...currentItem,
+          //   score: Number(currentItem.score) + Number(values.score),
+          // });
           setEditIntegralVisible(false);
           setEditIntegralVisible(false);
         }
         }
       }
       }
     },
     },
-    [currentItem, dispatch, getInfoById, tableSelect]
+    [currentItem, dispatch, getInfoById, tableSelect, resultss]
   );
   );
 
 
   return (
   return (

+ 47 - 33
houtai/src/pages/A6IDUser/index.tsx

@@ -1,5 +1,5 @@
 import { RootState } from "@/store";
 import { RootState } from "@/store";
-import { Input, DatePicker, Table, Button, Popconfirm, Switch } from "antd";
+import { Input, Table, Button, Popconfirm, Select } from "antd";
 import React, {
 import React, {
   useCallback,
   useCallback,
   useEffect,
   useEffect,
@@ -19,8 +19,6 @@ import {
 } from "@/store/action/A6IDUser";
 } from "@/store/action/A6IDUser";
 import { MessageFu } from "@/utils/message";
 import { MessageFu } from "@/utils/message";
 
 
-const { RangePicker } = DatePicker;
-
 function A6IDUser() {
 function A6IDUser() {
   const dispatch = useDispatch();
   const dispatch = useDispatch();
 
 
@@ -31,8 +29,7 @@ function A6IDUser() {
     searchKey: "",
     searchKey: "",
     pageSize: 10,
     pageSize: 10,
     pageNum: 1,
     pageNum: 1,
-    startTime: "",
-    endTime: "",
+    isEnabled: "",
   });
   });
 
 
   // 账号的输入
   // 账号的输入
@@ -43,27 +40,18 @@ function A6IDUser() {
       setTableSelect({ ...tableSelect, searchKey: e.target.value, pageNum: 1 });
       setTableSelect({ ...tableSelect, searchKey: e.target.value, pageNum: 1 });
     }, 500);
     }, 500);
   };
   };
-  // 时间选择器改变
-  const timeChange = (date: any, dateString: any) => {
-    let startTime = "";
-    let endTime = "";
-    if (dateString[0] && dateString[1]) {
-      startTime = dateString[0] + " 00:00:00";
-      endTime = dateString[1] + " 23:59:59";
-    }
-    setTableSelect({ ...tableSelect, startTime, endTime, pageNum: 1 });
-  };
 
 
   const [inputKey, setInputKey] = useState(1);
   const [inputKey, setInputKey] = useState(1);
-  // 重置
+
+  // // 重置
   const resetFu = () => {
   const resetFu = () => {
     setInputKey(Date.now());
     setInputKey(Date.now());
+    setSelectKey(null)
     setTableSelect({
     setTableSelect({
       searchKey: "",
       searchKey: "",
       pageSize: 10,
       pageSize: 10,
       pageNum: 1,
       pageNum: 1,
-      startTime: "",
-      endTime: "",
+      isEnabled: "",
     });
     });
   };
   };
 
 
@@ -72,6 +60,17 @@ function A6IDUser() {
   //   history.push(path);
   //   history.push(path);
   // }, []);
   // }, []);
 
 
+  const [selectKey, setSelectKey] = useState(null);
+
+  // 类型选择发生改变
+  const typeChange = useCallback(
+    (value: any) => {
+      setSelectKey(value);
+      setTableSelect({ ...tableSelect, isEnabled: value, pageNum: 1 });
+    },
+    [tableSelect]
+  );
+
   useEffect(() => {
   useEffect(() => {
     pageNumRef.current = tableSelect.pageNum;
     pageNumRef.current = tableSelect.pageNum;
     pagePageRef.current = tableSelect.pageSize;
     pagePageRef.current = tableSelect.pageSize;
@@ -98,7 +97,8 @@ function A6IDUser() {
   // 点击重置密码
   // 点击重置密码
   const resetPassFu = useCallback(async (id: number) => {
   const resetPassFu = useCallback(async (id: number) => {
     const res: any = await IDUserPassResetAPI(id);
     const res: any = await IDUserPassResetAPI(id);
-    if (res.code === 0) MessageFu.success("重置成功!");
+    if (res.code === 0)
+      MessageFu.success("用户密码已重置并以邮件形式发送至用户邮箱!");
   }, []);
   }, []);
 
 
   // 切换表格中的启用停用状态
   // 切换表格中的启用停用状态
@@ -118,15 +118,18 @@ function A6IDUser() {
   );
   );
 
 
   // 删除用户
   // 删除用户
-  const deleteIDUser = useCallback(async(id:number) => {
-    const res: any = await DelIDUserAPI(id);
-    if (res.code === 0) {
-      MessageFu.success("删除成功!")
-      pageNumRef.current = tableSelect.pageNum;
-      pagePageRef.current = tableSelect.pageSize;
-      dispatch(getIDUserListAPI(tableSelect));
-    };
-  }, [dispatch, tableSelect]);
+  const deleteIDUser = useCallback(
+    async (id: number) => {
+      const res: any = await DelIDUserAPI(id);
+      if (res.code === 0) {
+        MessageFu.success("删除成功!");
+        pageNumRef.current = tableSelect.pageNum;
+        pagePageRef.current = tableSelect.pageSize;
+        dispatch(getIDUserListAPI(tableSelect));
+      }
+    },
+    [dispatch, tableSelect]
+  );
 
 
   const columns = useMemo(() => {
   const columns = useMemo(() => {
     return [
     return [
@@ -169,7 +172,7 @@ function A6IDUser() {
                 积分管理
                 积分管理
               </Button>
               </Button>
               <Popconfirm
               <Popconfirm
-                title="是否将密码重置为123456?"
+                title="用户重置的密码将以邮件形式发送至用户邮箱"
                 okText="确认"
                 okText="确认"
                 cancelText="取消"
                 cancelText="取消"
                 onConfirm={() => resetPassFu(item.id!)}
                 onConfirm={() => resetPassFu(item.id!)}
@@ -198,11 +201,13 @@ function A6IDUser() {
                 cancelText="取消"
                 cancelText="取消"
                 onConfirm={() => {
                 onConfirm={() => {
                   // IDUserStateChange(item.id, item.isEnabled === 0 ? 1 : 0);
                   // IDUserStateChange(item.id, item.isEnabled === 0 ? 1 : 0);
-                  deleteIDUser(item.id)
+                  deleteIDUser(item.id);
                 }}
                 }}
                 okButtonProps={{ loading: false }}
                 okButtonProps={{ loading: false }}
               >
               >
-                <Button type="text" style={{color: "red"}}>{"删除"}</Button>
+                <Button type="text" style={{ color: "red" }}>
+                  {"删除"}
+                </Button>
               </Popconfirm>
               </Popconfirm>
             </>
             </>
           );
           );
@@ -228,8 +233,17 @@ function A6IDUser() {
             />
             />
           </div>
           </div>
           <div className="row">
           <div className="row">
-            <span>日期:</span>
-            <RangePicker key={inputKey} onChange={timeChange} />
+            <span>类型:</span>
+            <Select
+              style={{ width: 120 }}
+              value={selectKey}
+              onChange={typeChange}
+              placeholder="请选择"
+              options={[
+                { value: 0, label: "禁用" },
+                { value: 1, label: "启用" },
+              ]}
+            />
           </div>
           </div>
           <Button
           <Button
             className="reSetBtn"
             className="reSetBtn"

+ 8 - 5
houtai/src/store/action/A6IDUser.ts

@@ -18,9 +18,16 @@ export const getIDUserListAPI = (data: any) => {
 };
 };
 
 
 /**
 /**
+ * 获取用户列表
+ */
+export const getIDUserListAPI2 = (data: any) => {
+  return http.post("cms/user/pageList", data);
+};
+
+/**
  * 切换用户账号状态
  * 切换用户账号状态
  */
  */
-export const IDUserStateChangeAPI = (id:number,num:number) => {
+export const IDUserStateChangeAPI = (id: number, num: number) => {
   return http.get(`cms/user/isEnabled/${id}/${num}`);
   return http.get(`cms/user/isEnabled/${id}/${num}`);
 };
 };
 
 
@@ -31,7 +38,6 @@ export const getIDUserInfoByIdAPI = (id: number) => {
   return http.get(`cms/user/point/getList/${id}`);
   return http.get(`cms/user/point/getList/${id}`);
 };
 };
 
 
-
 /**
 /**
  * 保存用户积分修改
  * 保存用户积分修改
  */
  */
@@ -39,7 +45,6 @@ export const IDUserScoreSaveAPI = (data: SaveIDUserScoreType) => {
   return http.post("cms/user/point/add", data);
   return http.post("cms/user/point/add", data);
 };
 };
 
 
-
 /**
 /**
  * 重置密码
  * 重置密码
  */
  */
@@ -47,11 +52,9 @@ export const IDUserPassResetAPI = (id: number) => {
   return http.get(`cms/user/reset/pass/${id}`);
   return http.get(`cms/user/reset/pass/${id}`);
 };
 };
 
 
-
 /**
 /**
  * 删除用户
  * 删除用户
  */
  */
 export const DelIDUserAPI = (id: number) => {
 export const DelIDUserAPI = (id: number) => {
   return http.get(`cms/user/del/${id}`);
   return http.get(`cms/user/del/${id}`);
 };
 };
-

+ 1 - 0
houtai/src/types/api/A2Integral.ts

@@ -7,4 +7,5 @@ export type IntegralTableAPIType = {
   score: number;
   score: number;
   type: string;
   type: string;
   updateTime: string;
   updateTime: string;
+  prizeName: string;
 };
 };

+ 4 - 15
houtai/src/types/api/A5Exchange.d.ts

@@ -3,22 +3,11 @@ export type ExchangeTableType = {
   creatorId: number;
   creatorId: number;
   creatorName: string;
   creatorName: string;
   description: string;
   description: string;
-  dictAge: string;
-  dictLevel: string;
-  dictSource: string;
-  dictTexture: string;
-  dirCode: string;
-  display: number;
-  fileIds: string;
   id: number;
   id: number;
-  isBarrage: number;
   name: string;
   name: string;
-  num: string;
-  thumb: string;
-  topic: string;
-  type: string;
+  phone: string;
+  prizeId: number;
+  prizeName: string;
+  score: number;
   updateTime: string;
   updateTime: string;
-  tagType?: string;
-  tagCountry?: string;
 };
 };
-

hot - 离线版/.browserslistrc → scene - 副本/.browserslistrc


scene - 离线版/.env → scene - 副本/.env


scene - 离线版/.env.bendi → scene - 副本/.env.bendi


hot - 离线版/.eslintrc.js → scene - 副本/.eslintrc.js


scene - 离线版/.gitignore → scene - 副本/.gitignore


scene - 离线版/README.md → scene - 副本/README.md


hot - 离线版/babel.config.js → scene - 副本/babel.config.js


scene - 离线版/package-lock.json → scene - 副本/package-lock.json


scene - 离线版/package.json → scene - 副本/package.json


scene - 离线版/public/code.png → scene - 副本/public/code.png


scene - 离线版/public/index.html → scene - 副本/public/index.html


scene - 离线版/public/static/css/css/cropper.min.css → scene - 副本/public/static/css/cropper.min.css


scene - 离线版/public/static/css/cropper.min.css → scene - 副本/public/static/css/css/cropper.min.css


scene - 离线版/public/static/css/diyUpload.css → scene - 副本/public/static/css/css/diyUpload.css


scene - 离线版/public/static/fonts/FZ_GBK.ttf → scene - 副本/public/static/css/css/font/FZ_GBK.ttf


scene - 离线版/public/static/css/font/fontawesome-webfont.eot → scene - 副本/public/static/css/css/font/fontawesome-webfont.eot


scene - 离线版/public/static/css/font/fontawesome-webfont.svg → scene - 副本/public/static/css/css/font/fontawesome-webfont.svg


scene - 离线版/public/static/css/font/fontawesome-webfont.ttf → scene - 副本/public/static/css/css/font/fontawesome-webfont.ttf


scene - 离线版/public/static/css/font/fontawesome-webfont.woff → scene - 副本/public/static/css/css/font/fontawesome-webfont.woff


scene - 离线版/public/static/css/font/fontawesome-webfont.woff2 → scene - 副本/public/static/css/css/font/fontawesome-webfont.woff2


scene - 离线版/public/static/fonts/mp-font.ttf → scene - 副本/public/static/css/css/font/mp-font.ttf


scene - 离线版/public/static/fonts/open-sans/OpenSansLight.woff2 → scene - 副本/public/static/css/css/font/open-sans-light/OpenSansLight.woff2


scene - 离线版/public/static/fonts/open-sans-semibold/OpenSansSemibold.woff2 → scene - 副本/public/static/css/css/font/open-sans-semibold/OpenSansSemibold.woff2


scene - 离线版/public/static/fonts/open-sans/OpenSansRegular.woff2 → scene - 副本/public/static/css/css/font/open-sans/OpenSansRegular.woff2


scene - 离线版/public/static/css/css/main.css → scene - 副本/public/static/css/css/main.css


scene - 离线版/public/static/css/oldVer/font-awesome.min.css → scene - 副本/public/static/css/css/oldVer/font-awesome.min.css


scene - 离线版/public/static/css/oldVer/main.css.bak → scene - 副本/public/static/css/css/oldVer/main.css.bak


+ 1 - 1
scene - 离线版/public/static/css/css/oldVer/main0.css

@@ -52,7 +52,7 @@ iframe{
 	opacity:0.1; 
 	opacity:0.1; 
 }
 }
 #closepop {
 #closepop {
-	background: url(https://super.4dage.com/images/close1.png) no-repeat;
+	background: url(../../../images/close1.png) no-repeat;
 	width: 60px;
 	width: 60px;
 	height: 60px;
 	height: 60px;
 	cursor: pointer;
 	cursor: pointer;

scene - 离线版/public/static/css/oldVer/main0.css.bak → scene - 副本/public/static/css/css/oldVer/main0.css.bak


scene - 离线版/public/static/css/oldVer/video-js.css → scene - 副本/public/static/css/css/oldVer/video-js.css


scene - 离线版/public/static/css/popupwindow.css → scene - 副本/public/static/css/css/popupwindow.css


scene - 离线版/public/static/css/css/sceen2.css → scene - 副本/public/static/css/css/sceen2.css


scene - 离线版/public/static/css/toolBox.css → scene - 副本/public/static/css/css/toolBox.css


scene - 离线版/public/static/css/css/diyUpload.css → scene - 副本/public/static/css/diyUpload.css


scene - 离线版/public/static/css/font/FZ_GBK.ttf → scene - 副本/public/static/css/font/FZ_GBK.ttf


scene - 离线版/public/static/css/css/font/fontawesome-webfont.eot → scene - 副本/public/static/css/font/fontawesome-webfont.eot


scene - 离线版/public/static/css/css/font/fontawesome-webfont.svg → scene - 副本/public/static/css/font/fontawesome-webfont.svg


scene - 离线版/public/static/css/css/font/fontawesome-webfont.ttf → scene - 副本/public/static/css/font/fontawesome-webfont.ttf


scene - 离线版/public/static/css/css/font/fontawesome-webfont.woff → scene - 副本/public/static/css/font/fontawesome-webfont.woff


scene - 离线版/public/static/css/css/font/fontawesome-webfont.woff2 → scene - 副本/public/static/css/font/fontawesome-webfont.woff2


scene - 离线版/public/static/css/font/mp-font.ttf → scene - 副本/public/static/css/font/mp-font.ttf


scene - 离线版/public/static/fonts/open-sans-light/OpenSansLight.woff2 → scene - 副本/public/static/css/font/open-sans-light/OpenSansLight.woff2


scene - 离线版/public/static/css/font/open-sans-semibold/OpenSansSemibold.woff2 → scene - 副本/public/static/css/font/open-sans-semibold/OpenSansSemibold.woff2


scene - 离线版/public/static/css/font/open-sans/OpenSansRegular.woff2 → scene - 副本/public/static/css/font/open-sans/OpenSansRegular.woff2


scene - 离线版/public/static/css/lzb.css → scene - 副本/public/static/css/lzb.css


scene - 离线版/public/static/css/main.css → scene - 副本/public/static/css/main.css


scene - 离线版/public/static/css/css/oldVer/font-awesome.min.css → scene - 副本/public/static/css/oldVer/font-awesome.min.css


scene - 离线版/public/static/css/css/oldVer/main.css.bak → scene - 副本/public/static/css/oldVer/main.css.bak


scene - 离线版/public/static/css/oldVer/main0.css → scene - 副本/public/static/css/oldVer/main0.css


scene - 离线版/public/static/css/css/oldVer/main0.css.bak → scene - 副本/public/static/css/oldVer/main0.css.bak


scene - 离线版/public/static/css/css/oldVer/video-js.css → scene - 副本/public/static/css/oldVer/video-js.css


+ 0 - 0
scene - 离线版/public/static/css/css/popupwindow.css


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio