aamin 2 rokov pred
rodič
commit
df91e68a84

+ 1 - 1
houtai/src/components/Z_RichText/index.module.scss

@@ -1,7 +1,7 @@
 .RichText {
   :global {
     .txtBox {
-      width: 1000px;
+      width: 800px;
       border: 1px solid #ccc;
 
       // 隐藏媒体功能

+ 25 - 28
houtai/src/pages/A2Integral/index.module.scss

@@ -1,37 +1,34 @@
-.A2Share {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-  background-color: rgb(239, 239, 239);
+.A2Integral {
   :global {
-    .userTop {
-      border-radius: 4px;
-      padding: 15px 20px 25px 20px;
+    .logTop {
+      border-radius: 10px;
       background-color: #fff;
-      box-shadow: 3px 0px 10px 0px #d5d5d9;
-      .pageTitle {
-        .exportBtn {
-          width: 100px;
-          height: 40px;
-          
-        }
-      }
-      .flexRow {
+
+      .tableSelectBox {
+        padding: 15px 24px;
         display: flex;
-        justify-content: left;
         align-items: center;
-        margin-bottom: 20px;
-        .numberTxt {
-          margin-right: 10px;
+
+        .row {
+          margin-right: 20px;
+        }
+        .reSetBtn{
+          float: right;
+          height: 100%;
         }
       }
     }
-    .editFoot {
-      width: 100%;
-      margin-top: 20px;
-      display: flex;
-      justify-content: space-around;
+
+    .tableMain {
+      border-radius: 10px;
+      margin-top: 15px;
+      height: calc(100% - 75px);
+      background-color: #fff;
+
+      .ant-table-body {
+        height: 500px;
+
+      }
     }
   }
-}
+}

+ 152 - 380
houtai/src/pages/A2Integral/index.tsx

@@ -1,420 +1,192 @@
-import React, { useCallback, useEffect, useState } from "react";
-import styles from "./index.module.scss";
-import { Button, Form, Input, Modal, Popconfirm } from "antd";
-import { getShareAPI, shareEditAPI } from "@/store/action/A2Integral";
-import { useDispatch, useSelector } from "react-redux";
 import { RootState } from "@/store";
-import { MessageFu } from "@/utils/message";
+import { getLogListAPI } from "@/store/action/A7Log";
+import { Input, DatePicker, Table, Button, Select } from "antd";
+import React, { useEffect, useMemo, useRef, useState } from "react";
+import { useDispatch, useSelector } from "react-redux";
 
-import ExportJsonExcel from "js-export-excel";
-import html2canvas from "html2canvas";
+import styles from "./index.module.scss";
+import { IntegralTableAPIType } from "@/types";
 
-function A2Share() {
-  const dispatch = useDispatch();
-  const [open, setOpen] = useState(false);
-  const [exportOpen, setExportOpen] = useState(false);
+const { RangePicker } = DatePicker;
 
-  const shareInfo = useSelector((state: RootState) => state.A2Integral.shareInfo);
-  const [form] = Form.useForm();
-  const [curEdit, setCurEdit] = useState({} as any);
-  const onFinish = useCallback(
-    async (values: any) => {
-      if (values.numberVal) {
-        console.log(values.numberVal, curEdit, {
-          pcs: Number(values.numberVal),
-          sceneCode: "museum_cctv_mianyan",
-          type: curEdit.type,
-        });
-        const res: any = await shareEditAPI({
-          pcs: Number(values.numberVal),
-          sceneCode: "museum_cctv_mianyan",
-          type: curEdit.type,
-        });
-        if (res.code === 0) {
-          MessageFu.success("编辑成功!");
-          dispatch(getShareAPI());
-          setOpen(false);
-        }
-      }
-    },
-    [curEdit, dispatch]
-  );
+function A2Integral() {
+  const dispatch = useDispatch();
 
-  // 生成导出的数据行
-  const [editList, setEditList] = useState([
-    {
-      id: 1,
-      name: "用户浏览量",
-      numberVal: 2001,
-      type: "visit",
-      date: "",
-    },
-    {
-      id: 2,
-      name: "用户点赞量",
-      numberVal: 2002,
-      type: "star",
-      date: "",
-    },
-    {
-      id: 3,
-      name: "展区浏览量",
-      numberVal: 2003,
-      type: "area",
-      date: "",
-    },
-    {
-      id: 4,
-      name: "展位浏览量",
-      numberVal: 2004,
-      type: "booth",
-      date: "",
-    },
-    {
-      id: 5,
-      name: "展品浏览量",
-      numberVal: 2004,
-      type: "exhibits",
-      date: "",
-    },
-  ]);
+  const pageNumRef = useRef(1);
+  const pagePageRef = useRef(10);
+  // 筛选和分页
+  const [tableSelect, setTableSelect] = useState({
+    searchKey: "",
+    pageSize: 10,
+    pageNum: 1,
+    startTime: "",
+    endTime: "",
+    type: "",
+  });
 
-  // 导出excel
-  const exportExcel = useCallback(() => {
-    let sheetFilter = ["id", "name", "numberVal", "date"];
-    let option = {} as any;
-    option.fileName = `云展数据统计`;
-    option.datas = [
-      {
-        sheetData: editList,
-        sheetName: `云展数据统计`,
-        sheetFilter: sheetFilter,
-        sheetHeader: ["序号", "标题", "数量", "日期"],
-        columnWidths: [10, 10, 10, 10],
-      },
-    ];
-    var toExcel = new ExportJsonExcel(option); //new
-    toExcel.saveExcel(); //保存
-    setExportOpen(false);
-  }, [editList]);
+  // 账号的输入
+  const nameTime = useRef(-1);
+  const nameChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+    clearTimeout(nameTime.current);
+    nameTime.current = window.setTimeout(() => {
+      setTableSelect({ ...tableSelect, searchKey: e.target.value, pageNum: 1 });
+    }, 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 [donImg, setDonImg] = useState(false);
+  // 类型选择发生改变
+  const typeChange = (value: any) => {
+    setTableSelect({ ...tableSelect, type: value, pageNum: 1 });
+  };
 
-  const dataURLToBlob = useCallback((dataurl: any) => {
-    let arr = dataurl.split(",");
-    let mime = arr[0].match(/:(.*?);/)[1];
-    let bstr = atob(arr[1]);
-    let n = bstr.length;
-    let u8arr = new Uint8Array(n);
-    while (n--) {
-      u8arr[n] = bstr.charCodeAt(n);
-    }
-    return new Blob([u8arr], { type: mime });
-  }, []);
+  const [inputKey, setInputKey] = useState(1);
+  // 重置
+  const resetFu = () => {
+    setInputKey(Date.now());
+    setTableSelect({
+      searchKey: "",
+      pageSize: 10,
+      pageNum: 1,
+      startTime: "",
+      endTime: "",
+      type: "",
+    });
+  };
 
-  // 导出截图
-  const exportPNG = useCallback(() => {
-    setDonImg(true);
-    window.setTimeout(() => {
-      const canEle: HTMLDivElement = document.querySelector(".H5MainBoxInfo")!; //获取dom
-      let a = document.createElement("a");
-      html2canvas(canEle, {
-        backgroundColor: "transparent",
-        allowTaint: true,
-        useCORS: true,
-      }).then((canvas) => {
-        let dom = document.body.appendChild(canvas);
-        dom.style.display = "none";
-        a.style.display = "none";
-        document.body.removeChild(dom);
-        let blob: any = dataURLToBlob(dom.toDataURL("image/png"));
-        a.setAttribute("href", URL.createObjectURL(blob));
-        //这块是保存图片操作  可以设置保存的图片的信息
-        a.setAttribute("download", "云展览数据.png");
-        document.body.appendChild(a);
-        a.click();
-        URL.revokeObjectURL(blob);
-        document.body.removeChild(a);
-        setDonImg(false);
-        setExportOpen(false);
-      });
-    }, 100);
-  }, [dataURLToBlob]);
+  useEffect(() => {
+    pageNumRef.current = tableSelect.pageNum;
+    pagePageRef.current = tableSelect.pageSize;
+    dispatch(getLogListAPI(tableSelect));
+  }, [dispatch, tableSelect]);
 
-  // 回显
-  const getInfoFu = useCallback(
-    (v: any) => {
-      setCurEdit(v);
-      const { numberVal } = v;
-      form.setFieldsValue({
-        numberVal: numberVal,
-      });
-      console.log(curEdit);
-    },
-    [curEdit, form]
-  );
+  // ---------关于表格
 
-  const onFinishFailed = (errorInfo: any) => {
-    console.log("Failed:", errorInfo);
+  // 页码变化
+  const paginationChange = (pageNum: number, pageSize: number) => {
+    pageNumRef.current = pageNum;
+    pagePageRef.current = pageSize;
+    setTableSelect({ ...tableSelect, pageNum, pageSize });
   };
 
-  useEffect(() => {
-    dispatch(getShareAPI());
-  }, [dispatch]);
+  const results = useSelector((state: RootState) => state.A7Log.tableInfo);
 
-  useEffect(() => {
-    let date = new Date().toLocaleDateString("zh-CN");
-    setEditList([
+  const columns = useMemo(() => {
+    return [
+      // {
+      //   width: 100,
+      //   title: "序号",
+      //   render: (text: any, record: any, index: any) =>
+      //     index + 1 + (pageNumRef.current - 1) * pagePageRef.current,
+      // },
       {
-        id: 1,
-        name: "用户浏览量",
-        numberVal: shareInfo.pcsVisitShow,
-        type: "visit",
-        date: date,
+        title: "用户名",
+        dataIndex: "userName",
       },
       {
-        id: 2,
-        name: "用户点赞量",
-        numberVal: shareInfo.pcsStarShow,
-        type: "star",
-        date: date,
+        title: "时间",
+        dataIndex: "createTime",
       },
       {
-        id: 3,
-        name: "展区浏览量",
-        numberVal: shareInfo.pcsArea,
-        type: "area",
-        date: date,
+        title: "类型",
+        dataIndex: "ip",
       },
       {
-        id: 4,
-        name: "展位浏览量",
-        numberVal: shareInfo.pcsBooth,
-        type: "booth",
-        date: date,
+        title: "积分",
+        dataIndex: "type",
       },
       {
-        id: 5,
-        name: "展品浏览量",
-        numberVal: shareInfo.pcsExhibits,
-        type: "exhibits",
-        date: date,
+        title: "说明",
+        render: (item: IntegralTableAPIType) => {
+          return (
+            <>
+            {item.explain}
+            </>
+          );
+        },
       },
-    ]);
-  }, [shareInfo]);
+    ];
+  }, []);
 
   return (
-    <div className={styles.A2Share}>
-      <div className="H5MainBoxInfo">
-        <div className="userTop">
-          <div className="pageTitle">
-            数据管理
-            {!donImg ? (
-              <div
-                style={{
-                  display: "flex",
-                  flexDirection: "column",
-                  float: "right",
-                  justifyContent: "center",
-                  alignItems: "center",
-                }}
-              >
-                <Button
-                  type="primary"
-                  style={{
-                    width: "70px",
-                    height: "30px",
-                    borderRadius: "3px",
-                    boxShadow: "none",
-                    fontSize: "12px",
-                    float: "right",
-                  }}
-                  onClick={() => {
-                    setExportOpen(true);
-                  }}
-                >
-                  导出
-                </Button>
-                <div
-                  style={{
-                    fontSize: "12px",
-                    color: "gray",
-                    float: "right",
-                    marginTop: "5px",
-                  }}
-                >
-                  导出excel,png文件
-                </div>
-              </div>
-            ) : (
-              ""
-            )}
-            <div
-              style={{
-                color: "gray",
-                fontSize: "15px",
-                float: "right",
-                marginRight: "40px",
-              }}
-            >
-              <span style={{ marginRight: "20px" }}>
-                真实浏览量:{shareInfo.pcsVisit}
-              </span>
-              <span>真实点赞量:{shareInfo.pcsStar}</span>
-            </div>
+    <div className={styles.A2Integral}>
+      <div className="pageTitle">积分记录</div>
+      <div className="logTop">
+        <div className="tableSelectBox">
+          <div className="row">
+            <span>用户名:</span>
+            <Input
+              key={inputKey}
+              maxLength={15}
+              style={{ width: 150 }}
+              placeholder="请输入"
+              allowClear
+              onChange={(e) => nameChange(e)}
+            />
           </div>
-          {editList.map((v) => (
-            <div className="flexRow" key={v.id}>
-              <div className="numberTxt">
-                {v.name}:&emsp;{v.numberVal ? v.numberVal : 0}
-              </div>
-              <Button
-                type="primary"
-                style={{
-                  width: "70px",
-                  height: "30px",
-                  borderRadius: "3px",
-                  boxShadow: "none",
-                  fontSize: "12px",
-                }}
-                onClick={() => {
-                  getInfoFu(v);
-                  setOpen(true);
-                }}
-              >
-                修改
-              </Button>
-            </div>
-          ))}
-        </div>
-      </div>
-      {/* 点击修改按钮后的修改弹窗 */}
-      <Modal
-        destroyOnClose
-        closable={false}
-        maskClosable={false}
-        open={open}
-        title="   "
-        onCancel={() => setOpen(false)}
-        footer={
-          [] // 设置footer为空,去掉 取消 确定默认按钮
-        }
-      >
-        <Form
-          form={form}
-          name="basic"
-          labelCol={{ span: 5 }}
-          onFinish={onFinish}
-          onFinishFailed={onFinishFailed}
-          autoComplete="off"
-        >
-          <Form.Item
-            label={curEdit.name}
-            name="numberVal"
-            style={{ marginTop: "40px" }}
-            rules={[{ required: true, message: "不能为空!" }]}
-            hide-required-asterisk={true}
-            getValueFromEvent={(e) =>
-              e.target.value.replace(/^(0+)|[^\d]+/g, "")
-            }
-          >
-            <Input maxLength={9} placeholder="请输入正整数,不超过999999999" />
-          </Form.Item>
-          {/* 确定和取消按钮 */}
-          <br />
-          <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
-            <Button type="primary" htmlType="submit">
-              提交
-            </Button>
-            &emsp;
-            <Popconfirm
-              title="放弃编辑后,信息将不会保存!"
-              okText="放弃"
-              cancelText="取消"
-              onConfirm={() => {
-                setOpen(false);
-              }}
-              okButtonProps={{ loading: false }}
-            >
-              <Button>取消</Button>
-            </Popconfirm>
-          </Form.Item>
-        </Form>
-      </Modal>
-      {/* 点击导出,选择导出格式 */}
-      <Modal
-        destroyOnClose
-        closable={false}
-        maskClosable={false}
-        open={exportOpen}
-        title="选择需要导出的格式"
-        onCancel={() => setExportOpen(false)}
-        footer={
-          [] // 设置footer为空,去掉 取消 确定默认按钮
-        }
-      >
-        <div
-          style={{
-            width: "100%",
-            display: "flex",
-            justifyContent: "space-around",
-            marginTop: "30px",
-            marginBottom: "30px",
-          }}
-        >
-          <Button
-            type="primary"
-            onClick={() => {
-              exportExcel();
-            }}
-          >
-            Excle
-          </Button>
+          <div className="row">
+            <span>日期:</span>
+            <RangePicker key={inputKey} onChange={timeChange} />
+          </div>
+
+          <div className="row">
+            <span>类型:</span>
+            <Select
+              value={tableSelect.type}
+              defaultValue="lucy"
+              style={{ width: 120 }}
+              onChange={typeChange}
+              options={[
+                { value: "jack", label: "Jack" },
+                { value: "lucy", label: "Lucy" },
+                { value: "Yiminghe", label: "yiminghe" },
+              ]}
+            />
+          </div>
+
           <Button
+            className="reSetBtn"
+            size="small"
             type="primary"
             onClick={() => {
-              exportPNG();
+              resetFu();
             }}
           >
-            png
+            重置
           </Button>
-          {/* <Button
-            type="primary"
-            onClick={() => {
-              exportWord();
-            }}
-          >
-            Word
-          </Button> */}
         </div>
-        <div
-          style={{
-            width: "100%",
-            display: "flex",
-            justifyContent: "end",
+      </div>
+
+      {/* 表格主体 */}
+      <div className="tableMain">
+        <Table
+          scroll={{ y: 625 }}
+          dataSource={results.list}
+          columns={columns}
+          rowKey="id"
+          pagination={{
+            showQuickJumper: true,
+            position: ["bottomCenter"],
+            showSizeChanger: true,
+            current: tableSelect.pageNum,
+            pageSize: tableSelect.pageSize,
+            total: results.total,
+            onChange: paginationChange,
           }}
-        >
-          <Popconfirm
-            title="放弃编辑后,信息将不会保存!"
-            okText="放弃"
-            cancelText="取消"
-            onConfirm={() => {
-              setExportOpen(false);
-            }}
-            style={{
-              float: "right",
-            }}
-            okButtonProps={{ loading: false }}
-          >
-            <Button>取消</Button>
-          </Popconfirm>
-        </div>
-      </Modal>
+        />
+      </div>
     </div>
   );
 }
 
-const MemoA2Share = React.memo(A2Share);
+const MemoA2Integral = React.memo(A2Integral);
 
-export default MemoA2Share;
+export default MemoA2Integral;

+ 53 - 3
houtai/src/pages/A4Prize/index.module.scss

@@ -1,5 +1,55 @@
-.AAAAA{
-  :global{
-    
+.A4Prize {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  background-color: rgb(239, 239, 239);
+
+  :global {
+    .ruleTop {
+      border-radius: 4px;
+      padding: 15px 20px 25px 20px;
+      background-color: #fff;
+      box-shadow: 3px 0px 10px 0px #d5d5d9;
+      position: relative;
+
+      .pageTitle {
+        .exportBtn {
+          width: 100px;
+          height: 40px;
+        }
+      }
+
+      .scoreLimitBtn {
+        position: absolute;
+        right: 2.5%;
+        top: 3%;
+        height: 30px;
+        cursor: pointer;
+        // transform: translateY(-50%);
+      }
+
+      .tableBox1 {
+        border-radius: 4px;
+        overflow: hidden;
+        margin-top: -10px;
+        // height: calc(100% - 80px);
+        // background-color: #fff;
+        padding: 0px;
+        // box-shadow: 3px 0px 10px 0px #d5d5d9;
+
+        .ant-table-body {
+          height: 300px;
+          overflow-y: auto !important;
+          overflow-y: overlay !important;
+
+          .ant-table-row {
+            .ant-table-cell {
+              padding: 10px;
+            }
+          }
+        }
+      }
+    }
   }
 }

+ 380 - 8
houtai/src/pages/A4Prize/index.tsx

@@ -1,14 +1,386 @@
-import React from "react";
+import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
 import styles from "./index.module.scss";
- function AAAAA() {
-  
+import {
+  Button,
+  Form,
+  Input,
+  Modal,
+  Table,
+  Popconfirm,
+  DatePicker,
+  DatePickerProps,
+  Select,
+  Upload,
+  message,
+} from "antd";
+import { useDispatch, useSelector } from "react-redux";
+import { RootState } from "@/store";
+import { AddPrizeType, PrizeTableType } from "@/types";
+import ImageLazy from "@/components/ImageLazy";
+import {
+  addPrizeByIdAPI,
+  deletePrizeByIdAPI,
+  editPrizeByIdAPI,
+  getPrizeDetailAPI,
+  getPrizeListAPI,
+} from "@/store/action/A4Prise";
+import { MessageFu } from "@/utils/message";
+import { RangePickerProps } from "antd/es/date-picker";
+import { LoadingOutlined, PlusOutlined } from "@ant-design/icons";
+import {
+  RcFile,
+  UploadChangeParam,
+  UploadFile,
+  UploadProps,
+} from "antd/es/upload";
+import RichText from "@/components/Z_RichText";
+
+function A4Prize() {
+  const dispatch = useDispatch();
+  // 从仓库中获取表格数据
+  const tableInfo = useSelector((state: RootState) => state.A4Prise.tableInfo);
+
+  // 当前是编辑还是增加?
+  const [modalType, setModalType] = React.useState<string>("add");
+
+  // 当前编辑单元
+  const [editItem, setEditItem] = React.useState<PrizeTableType>();
+  // 编辑/新增页面弹窗开关
+  const [editPageVisible, setEditPageVisible] = React.useState(false);
+  // 编辑/新增页面弹窗打开
+  const openEditPageFu = useCallback(
+    async (id?: number) => {
+      setEditPageVisible(true);
+      if (id) {
+        setModalType("edit");
+        // 获取奖品详情
+        const res = await getPrizeDetailAPI(id);
+        if (res.code === 0) {
+          setEditItem(res.data);
+        }
+      } else {
+        setModalType("add");
+      }
+    },
+    [setEditItem]
+  );
+
+  // 通过id删除奖品
+  const deletePrizeFu = useCallback(async (id: number) => {
+    const res = await deletePrizeByIdAPI(id);
+    if (res.code === 0) {
+      MessageFu.success("删除成功");
+    }
+  }, []);
+  const [form] = Form.useForm();
+
+  const getList = useCallback(async () => {
+    dispatch(getPrizeListAPI());
+  }, [dispatch]);
+
+  const onFinish = useCallback(
+    async (values: any) => {
+      if (values.numberVal) {
+        const res: any =
+          modalType === "add"
+            ? await addPrizeByIdAPI({} as AddPrizeType)
+            : await editPrizeByIdAPI({} as AddPrizeType);
+        if (res.code === 0) {
+          MessageFu.success("提交成功!");
+          getList();
+          setEditPageVisible(false);
+        }
+      }
+    },
+    [getList, modalType]
+  );
+
+  const [loading, setLoading] = React.useState<boolean>(false);
+
+  const [imageUrl, setImageUrl] = React.useState<string>("");
+
+  const getBase64 = (img: RcFile, callback: (url: string) => void) => {
+    const reader = new FileReader();
+    reader.addEventListener("load", () => callback(reader.result as string));
+    reader.readAsDataURL(img);
+  };
+
+  const handleChange = (value: string) => {
+    console.log(`selected ${value}`);
+  };
+
+  const handleUploadChange: UploadProps["onChange"] = (
+    info: UploadChangeParam<UploadFile>
+  ) => {
+    if (info.file.status === "uploading") {
+      setLoading(true);
+      return;
+    }
+    if (info.file.status === "done") {
+      // Get this url from response in real world.
+      getBase64(info.file.originFileObj as RcFile, (url) => {
+        setLoading(false);
+        setImageUrl(url);
+      });
+    }
+  };
+
+  useEffect(() => {
+    getList();
+  }, [dispatch, getList]);
+  const columns = useMemo(() => {
+    return [
+      {
+        title: "奖品名称",
+        dataIndex: "name",
+      },
+      {
+        title: "封面",
+        render: (item: PrizeTableType) => (
+          <div className="tableImgAuto">
+            <ImageLazy width={60} height={60} src={item.thumb!} />
+          </div>
+        ),
+      },
+      {
+        title: "所需积分",
+        dataIndex: "needScore",
+      },
+      {
+        title: "库存",
+        dataIndex: "inventory",
+      },
+      {
+        title: "登记日期",
+        dataIndex: "date",
+      },
+      {
+        title: "状态",
+        dataIndex: "state",
+      },
+      {
+        title: "操作",
+        render: (item: PrizeTableType) => {
+          return (
+            <>
+              <Button
+                size="small"
+                type="text"
+                onClick={() => openEditPageFu(item.id)}
+              >
+                编辑
+              </Button>
+              <Button
+                size="small"
+                type="text"
+                onClick={() => deletePrizeFu(item.id)}
+              >
+                删除
+              </Button>
+            </>
+          );
+        },
+      },
+    ];
+  }, [deletePrizeFu, openEditPageFu]);
+
+  const onChange = (
+    value: DatePickerProps["value"] | RangePickerProps["value"],
+    dateString: [string, string] | string
+  ) => {
+    console.log("Selected Time: ", value);
+    console.log("Formatted Selected Time: ", dateString);
+  };
+
+  const onOk = (
+    value: DatePickerProps["value"] | RangePickerProps["value"]
+  ) => {
+    console.log("onOk: ", value);
+  };
+
+  const beforeUpload = (file: RcFile) => {
+    const isJpgOrPng = file.type === "image/jpeg" || file.type === "image/png";
+    if (!isJpgOrPng) {
+      message.error("You can only upload JPG/PNG file!");
+    }
+    const isLt2M = file.size / 1024 / 1024 < 2;
+    if (!isLt2M) {
+      message.error("Image must smaller than 2MB!");
+    }
+    return isJpgOrPng && isLt2M;
+  };
+
+  const uploadButton = (
+    <div>
+      {loading ? <LoadingOutlined /> : <PlusOutlined />}
+      <div style={{ marginTop: 8 }}>Upload</div>
+    </div>
+  );
+
+  // 富文本的ref
+  const richTxtRef = useRef<any>(null);
+
+  // 文件的校验
+  const [check, setCheck] = useState(false);
+
+  // 文件的code码
+  const [dirCode, setDirCode] = useState("");
+
   return (
-    <div className={styles.AAAAA}>
-      <h1>AAAAA</h1>
+    <div className={styles.A4Prize}>
+      <div className="ruleTop">
+        <div className="pageTitle">奖品管理</div>
+        <Button
+          className="scoreLimitBtn"
+          size="small"
+          type="primary"
+          onClick={() => setEditPageVisible(true)}
+        >
+          新增
+        </Button>
+
+        {/* 表格主体 */}
+        <div className="tableBox1">
+          <Table
+            scroll={{ y: 500 }}
+            bordered={false}
+            dataSource={tableInfo.list}
+            columns={columns}
+            rowKey="id"
+            pagination={{
+              showQuickJumper: true,
+              position: ["bottomCenter"],
+              showSizeChanger: true,
+              total: tableInfo.total,
+            }}
+          />
+        </div>
+      </div>
+      {/* 编辑/新增弹窗 */}
+      <Modal
+        destroyOnClose
+        closable={false}
+        maskClosable={false}
+        open={editPageVisible}
+        title={modalType === "add" ? "新增奖品" : "编辑奖品"}
+        width={1000}
+        onCancel={() => setEditPageVisible(false)}
+        footer={
+          [] // 设置footer为空,去掉 取消 确定默认按钮
+        }
+      >
+        <Form
+          form={form}
+          name="basic"
+          labelCol={{ span: 3 }}
+          onFinish={onFinish}
+          autoComplete="off"
+        >
+          <Form.Item
+            label="奖品名称"
+            name="name"
+            rules={[{ required: true, message: "不能为空!" }]}
+          >
+            <Input maxLength={20} placeholder="请输入内容,不超过20个字" />
+          </Form.Item>
+          <Form.Item
+            label="所需的积分"
+            name="needScore"
+            rules={[{ required: true, message: "不能为空!" }]}
+          >
+            <Input maxLength={5} placeholder="请输入正整数,1-99999" />
+          </Form.Item>
+          <Form.Item
+            label="库存"
+            name="inventory"
+            rules={[{ required: true, message: "不能为空!" }]}
+          >
+            <Input maxLength={5} placeholder="请输入正整数,1-99999" />
+          </Form.Item>
+          <Form.Item
+            label="登记日期"
+            name="date"
+            rules={[{ required: true, message: "不能为空!" }]}
+          >
+            <DatePicker showTime onChange={onChange} onOk={onOk} />
+          </Form.Item>
+          <Form.Item
+            label="状态"
+            name="state"
+            rules={[{ required: true, message: "不能为空!" }]}
+          >
+            <Select
+              defaultValue="上架"
+              style={{ width: 120 }}
+              onChange={handleChange}
+              options={[
+                { value: "上架", label: "上架" },
+                { value: "下架", label: "下架" },
+              ]}
+            />
+          </Form.Item>
+          <Form.Item
+            label="封面"
+            name="themb"
+            rules={[{ required: true, message: "不能为空!" }]}
+          >
+            <Upload
+              name="avatar"
+              listType="picture-card"
+              className="avatar-uploader"
+              showUploadList={false}
+              action="https://run.mocky.io/v3/435e224c-44fb-4773-9faf-380c5e6a2188"
+              beforeUpload={beforeUpload}
+              onChange={handleUploadChange}
+            >
+              {imageUrl ? (
+                <img src={imageUrl} alt="avatar" style={{ width: "100%" }} />
+              ) : (
+                uploadButton
+              )}
+            </Upload>
+            <span>
+              格式要求:支持png、jpg和jpeg的图片格式;最大支持2M;最多1张
+            </span>
+          </Form.Item>
+          <Form.Item
+            label="产品简介"
+            name="introduction"
+            rules={[{ required: true, message: "不能为空!" }]}
+          >
+            <RichText
+              myUrl="cms/goods/upload"
+              ref={richTxtRef}
+              check={check}
+              dirCode={dirCode}
+              isLook={true}
+            />
+          </Form.Item>
+          {/* 确定和取消按钮 */}
+          <br />
+          <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
+            <Button type="primary" htmlType="submit">
+              提交
+            </Button>
+            &emsp;
+            <Popconfirm
+              title="放弃编辑后,信息将不会保存!"
+              okText="放弃"
+              cancelText="取消"
+              onConfirm={() => {
+                setEditPageVisible(false);
+              }}
+              okButtonProps={{ loading: false }}
+            >
+              <Button>取消</Button>
+            </Popconfirm>
+          </Form.Item>
+        </Form>
+      </Modal>
     </div>
-  )
+  );
 }
 
-const MemoAAAAA = React.memo(AAAAA);
+const MemoA4Prize = React.memo(A4Prize);
 
-export default MemoAAAAA;
+export default MemoA4Prize;

+ 32 - 3
houtai/src/pages/A5Exchange/index.module.scss

@@ -1,5 +1,34 @@
-.AAAAA{
-  :global{
-    
+.A5Exchange {
+  :global {
+    .logTop {
+      border-radius: 10px;
+      background-color: #fff;
+
+      .tableSelectBox {
+        padding: 15px 24px;
+        display: flex;
+        align-items: center;
+
+        .row {
+          margin-right: 20px;
+        }
+        .reSetBtn{
+          float: right;
+          height: 100%;
+        }
+      }
+    }
+
+    .tableMain {
+      border-radius: 10px;
+      margin-top: 15px;
+      height: calc(100% - 75px);
+      background-color: #fff;
+
+      .ant-table-body {
+        height: 500px;
+
+      }
+    }
   }
 }

+ 164 - 8
houtai/src/pages/A5Exchange/index.tsx

@@ -1,14 +1,170 @@
-import React from "react";
+import { RootState } from "@/store";
+import { getLogListAPI } from "@/store/action/A7Log";
+import { Input, DatePicker, Table, Button } from "antd";
+import React, { useEffect, useMemo, useRef, useState } from "react";
+import { useDispatch, useSelector } from "react-redux";
+
 import styles from "./index.module.scss";
- function AAAAA() {
-  
+
+const { RangePicker } = DatePicker;
+
+function A5Exchange() {
+  const dispatch = useDispatch();
+
+  const pageNumRef = useRef(1);
+  const pagePageRef = useRef(10);
+  // 筛选和分页
+  const [tableSelect, setTableSelect] = useState({
+    searchKey: "",
+    pageSize: 10,
+    pageNum: 1,
+    startTime: "",
+    endTime: "",
+  });
+
+  // 账号的输入
+  const nameTime = useRef(-1);
+  const nameChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+    clearTimeout(nameTime.current);
+    nameTime.current = window.setTimeout(() => {
+      setTableSelect({ ...tableSelect, searchKey: e.target.value, pageNum: 1 });
+    }, 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 resetFu = () => {
+    setInputKey(Date.now());
+    setTableSelect({
+      searchKey: "",
+      pageSize: 10,
+      pageNum: 1,
+      startTime: "",
+      endTime: "",
+    });
+  };
+
+  useEffect(() => {
+    pageNumRef.current = tableSelect.pageNum;
+    pagePageRef.current = tableSelect.pageSize;
+    dispatch(getLogListAPI(tableSelect));
+  }, [dispatch, tableSelect]);
+
+  // ---------关于表格
+
+  // 页码变化
+  const paginationChange = (pageNum: number, pageSize: number) => {
+    pageNumRef.current = pageNum;
+    pagePageRef.current = pageSize;
+    setTableSelect({ ...tableSelect, pageNum, pageSize });
+  };
+
+  const results = useSelector((state: RootState) => state.A7Log.tableInfo);
+
+  const columns = useMemo(() => {
+    return [
+      // {
+      //   width: 100,
+      //   title: "序号",
+      //   render: (text: any, record: any, index: any) =>
+      //     index + 1 + (pageNumRef.current - 1) * pagePageRef.current,
+      // },
+      {
+        title: "用户名",
+        dataIndex: "userName",
+      },
+      {
+        title: "兑换日期",
+        dataIndex: "createTime",
+      },
+      {
+        title: "兑换奖品",
+        dataIndex: "ip",
+      },
+      {
+        title: "积分记录",
+        dataIndex: "type",
+      },
+      {
+        title: "称呼",
+        dataIndex: "description",
+      },
+      {
+        title: "联系方式",
+        dataIndex: "description",
+      },
+      {
+        title: "地址和留言",
+        dataIndex: "description",
+      },
+    ];
+  }, []);
+
   return (
-    <div className={styles.AAAAA}>
-      <h1>AAAAA</h1>
+    <div className={styles.A5Exchange}>
+      <div className="pageTitle">兑换记录</div>
+      <div className="logTop">
+        <div className="tableSelectBox">
+          <div className="row">
+            <span>用户名:</span>
+            <Input
+              key={inputKey}
+              maxLength={15}
+              style={{ width: 150 }}
+              placeholder="请输入"
+              allowClear
+              onChange={(e) => nameChange(e)}
+            />
+          </div>
+          <div className="row">
+            <span>日期:</span>
+            <RangePicker key={inputKey} onChange={timeChange} />
+          </div>
+          <Button
+            className="reSetBtn"
+            size="small"
+            type="primary"
+            onClick={() => {
+              resetFu();
+            }}
+          >
+            重置
+          </Button>
+        </div>
+      </div>
+
+      {/* 表格主体 */}
+      <div className="tableMain">
+        <Table
+          scroll={{ y: 625 }}
+          dataSource={results.list}
+          columns={columns}
+          rowKey="id"
+          pagination={{
+            showQuickJumper: true,
+            position: ["bottomCenter"],
+            showSizeChanger: true,
+            current: tableSelect.pageNum,
+            pageSize: tableSelect.pageSize,
+            total: results.total,
+            onChange: paginationChange,
+          }}
+        />
+      </div>
     </div>
-  )
+  );
 }
 
-const MemoAAAAA = React.memo(AAAAA);
+const MemoA5Exchange = React.memo(A5Exchange);
 
-export default MemoAAAAA;
+export default MemoA5Exchange;

+ 32 - 3
houtai/src/pages/A6IDUser/index.module.scss

@@ -1,5 +1,34 @@
-.AAAAA{
-  :global{
-    
+.A6IDUser{
+  :global {
+    .logTop {
+      border-radius: 10px;
+      background-color: #fff;
+
+      .tableSelectBox {
+        padding: 15px 24px;
+        display: flex;
+        align-items: center;
+
+        .row {
+          margin-right: 20px;
+        }
+        .reSetBtn{
+          float: right;
+          height: 100%;
+        }
+      }
+    }
+
+    .tableMain {
+      border-radius: 10px;
+      margin-top: 15px;
+      height: calc(100% - 75px);
+      background-color: #fff;
+
+      .ant-table-body {
+        height: 500px;
+
+      }
+    }
   }
 }

+ 190 - 8
houtai/src/pages/A6IDUser/index.tsx

@@ -1,14 +1,196 @@
-import React from "react";
+import { RootState } from "@/store";
+import { getLogListAPI } from "@/store/action/A7Log";
+import { Input, DatePicker, Table, Button, Popconfirm } from "antd";
+import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
+import { useDispatch, useSelector } from "react-redux";
+import history from "@/utils/history";
 import styles from "./index.module.scss";
- function AAAAA() {
-  
+import { IDUserTableType } from "@/types/api/A6IDUser";
+
+const { RangePicker } = DatePicker;
+
+function A6IDUser() {
+  const dispatch = useDispatch();
+
+  const pageNumRef = useRef(1);
+  const pagePageRef = useRef(10);
+  // 筛选和分页
+  const [tableSelect, setTableSelect] = useState({
+    searchKey: "",
+    pageSize: 10,
+    pageNum: 1,
+    startTime: "",
+    endTime: "",
+  });
+
+  // 账号的输入
+  const nameTime = useRef(-1);
+  const nameChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+    clearTimeout(nameTime.current);
+    nameTime.current = window.setTimeout(() => {
+      setTableSelect({ ...tableSelect, searchKey: e.target.value, pageNum: 1 });
+    }, 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 resetFu = () => {
+    setInputKey(Date.now());
+    setTableSelect({
+      searchKey: "",
+      pageSize: 10,
+      pageNum: 1,
+      startTime: "",
+      endTime: "",
+    });
+  };
+
+  // 点击跳转
+  const pathCutFu = useCallback((path: string) => {
+    history.push(path);
+  }, []);
+
+  useEffect(() => {
+    pageNumRef.current = tableSelect.pageNum;
+    pagePageRef.current = tableSelect.pageSize;
+    dispatch(getLogListAPI(tableSelect));
+  }, [dispatch, tableSelect]);
+
+  // ---------关于表格
+
+  // 页码变化
+  const paginationChange = (pageNum: number, pageSize: number) => {
+    pageNumRef.current = pageNum;
+    pagePageRef.current = pageSize;
+    setTableSelect({ ...tableSelect, pageNum, pageSize });
+  };
+
+  const results = useSelector((state: RootState) => state.A7Log.tableInfo);
+
+  const columns = useMemo(() => {
+    return [
+      // {
+      //   width: 100,
+      //   title: "序号",
+      //   render: (text: any, record: any, index: any) =>
+      //     index + 1 + (pageNumRef.current - 1) * pagePageRef.current,
+      // },
+      {
+        title: "用户名",
+        dataIndex: "userName",
+      },
+      {
+        title: "手机号",
+        dataIndex: "createTime",
+      },
+      {
+        title: "创建日期",
+        dataIndex: "ip",
+      },
+      {
+        title: "状态",
+        dataIndex: "description",
+      },
+      {
+        title: "当前积分",
+        dataIndex: "description",
+      },
+      {
+        title: "操作",
+        render: (item: IDUserTableType) => {
+          return (
+            <>
+              <Button size="small" type="text" onClick={() => pathCutFu('/integral')}>
+                积分管理
+              </Button>
+              <Popconfirm
+                title="是否将密码重置为123456?"
+                okText="确认"
+                cancelText="取消"
+                okButtonProps={{ loading: false }}
+              >
+                <Button type="text">重置密码</Button>
+              </Popconfirm>
+              <Popconfirm
+                title="是否将用户设为黑名单"
+                okText="确认"
+                cancelText="取消"
+                okButtonProps={{ loading: false }}
+              >
+                <Button type="text">设为黑名单</Button>
+              </Popconfirm>
+            </>
+          );
+        },
+      },
+    ];
+  }, []);
+
   return (
-    <div className={styles.AAAAA}>
-      <h1>AAAAA</h1>
+    <div className={styles.A6IDUser}>
+      <div className="pageTitle">兑换记录</div>
+      <div className="logTop">
+        <div className="tableSelectBox">
+          <div className="row">
+            <span>用户名:</span>
+            <Input
+              key={inputKey}
+              maxLength={15}
+              style={{ width: 150 }}
+              placeholder="请输入"
+              allowClear
+              onChange={(e) => nameChange(e)}
+            />
+          </div>
+          <div className="row">
+            <span>日期:</span>
+            <RangePicker key={inputKey} onChange={timeChange} />
+          </div>
+          <Button
+            className="reSetBtn"
+            size="small"
+            type="primary"
+            onClick={() => {
+              resetFu();
+            }}
+          >
+            重置
+          </Button>
+        </div>
+      </div>
+
+      {/* 表格主体 */}
+      <div className="tableMain">
+        <Table
+          scroll={{ y: 625 }}
+          dataSource={results.list}
+          columns={columns}
+          rowKey="id"
+          pagination={{
+            showQuickJumper: true,
+            position: ["bottomCenter"],
+            showSizeChanger: true,
+            current: tableSelect.pageNum,
+            pageSize: tableSelect.pageSize,
+            total: results.total,
+            onChange: paginationChange,
+          }}
+        />
+      </div>
     </div>
-  )
+  );
 }
 
-const MemoAAAAA = React.memo(AAAAA);
+const MemoA6IDUser = React.memo(A6IDUser);
 
-export default MemoAAAAA;
+export default MemoA6IDUser;

+ 1 - 1
houtai/src/pages/C7Log/index.module.scss

@@ -22,7 +22,7 @@
       background-color: #fff;
 
       .ant-table-body {
-        height: 625px;
+        height: 500px;
 
       }
     }

+ 8 - 0
houtai/src/pages/Layout/index.tsx

@@ -74,6 +74,14 @@ function Layout() {
         inco: inco1,
         done: true,
       },
+      {
+        id: 104,
+        name: "题目设置",
+        path: "/topicSetting",
+        Com: React.lazy(() => import("../TopicSetting")),
+        inco: inco1,
+        done: false,
+      },
     ];
     return arr;
   }, []);

+ 5 - 0
houtai/src/pages/TopicSetting/index.module.scss

@@ -0,0 +1,5 @@
+.AAAAA{
+  :global{
+    
+  }
+}

+ 14 - 0
houtai/src/pages/TopicSetting/index.tsx

@@ -0,0 +1,14 @@
+import React from "react";
+import styles from "./index.module.scss";
+ function AAAAA() {
+  
+  return (
+    <div className={styles.AAAAA}>
+      <h1>AAAAA</h1>
+    </div>
+  )
+}
+
+const MemoAAAAA = React.memo(AAAAA);
+
+export default MemoAAAAA;

+ 30 - 5
houtai/src/store/action/A4Prise.ts

@@ -1,23 +1,48 @@
 import http from "@/utils/http";
 import { AppDispatch } from "..";
+import { AddPrizeType } from "@/types";
 // import { AxiosRequestConfig } from "axios";
 /**
- * 获取浏览量信息
+ * 获取奖品列表
  */
-export const getShareAPI = () => {
+export const getPrizeListAPI = () => {
   return async (dispatch: AppDispatch) => {
     const res = await http.get(`cms/share/detail/museum_cctv_mianyan`);
     if (res.code === 0) {
       const data = res.data;
-      dispatch({ type: "Share/getShare", payload: data });
+      dispatch({ type: "prise/getList", payload: data });
     }
   };
 };
 
 /**
- * 提交参与者基数
+ * 获得奖品详情
  */
-export const shareEditAPI = (data: any) => {
+export const getPrizeDetailAPI = (id: number) => {
+  // return http.post(`/cms/share/save/`, data);
+  return http.get(`cms/share/edit/id=${id}`);
+};
+
+/**
+ * 通过id删除奖品
+ */
+export const deletePrizeByIdAPI = (id: number) => {
+  // return http.post(`/cms/share/save/`, data);
+  return http.post(`cms/share/edit/`, { id: id });
+};
+
+/**
+ * 保存奖品编辑
+ */
+export const editPrizeByIdAPI = (data: AddPrizeType) => {
+  // return http.post(`/cms/share/save/`, data);
+  return http.post(`cms/share/edit/`, data);
+};
+
+/**
+ * 添加奖品
+ */
+export const addPrizeByIdAPI = (data: AddPrizeType) => {
   // return http.post(`/cms/share/save/`, data);
   return http.post(`cms/share/edit/`, data);
 };

+ 49 - 0
houtai/src/store/action/TopicSetting.ts

@@ -0,0 +1,49 @@
+import http from "@/utils/http";
+import { AppDispatch } from "..";
+import { SaveRuleType, SaveScoreLimitType } from "@/types";
+// import { AxiosRequestConfig } from "axios";
+/**
+ * 获取游戏规则列表
+ */
+export const getRuleAPI = () => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.get(`cms/share/detail/museum_cctv_mianyan`);
+    if (res.code === 0) {
+      const data = res.data;
+      dispatch({ type: "rules/getList", payload: data });
+    }
+  };
+};
+
+/**
+ * 修改游戏规则
+ */
+export const ruleSaveAPI = (data: SaveRuleType) => {
+  return http.post("sys/user/save", data);
+};
+
+/**
+ * 获取游戏info
+ */
+export const getRuleInfoByIdAPI = (id: number) => {
+  return http.get(`sys/user/detail/${id}`);
+};
+
+
+/**
+ * 获得每日积分上限
+ */
+export const getScoreLimitAPI = () => {
+  return http.get("sys/user/save");
+};
+
+
+/**
+ * 保存每日积分上限
+ */
+export const scoreLimitSaveAPI = (data: SaveScoreLimitType) => {
+  return http.post("sys/user/save", data);
+};
+
+
+

+ 3 - 3
houtai/src/store/reducer/A2Integral.ts

@@ -1,15 +1,15 @@
-import { ShareDataAPIType } from "@/types";
+import { IntegralTableAPIType } from "@/types";
 
 // 初始化状态
 const initState = {
   // 分享数据
-  shareInfo: {} as ShareDataAPIType,
+  shareInfo: {} as IntegralTableAPIType,
 };
 
 // 定义 action 类型
 type ShareActionType = {
   type: "Share/getShare";
-  payload: ShareDataAPIType;
+  payload: IntegralTableAPIType;
 };
 
 // 频道 reducer

+ 5 - 5
houtai/src/store/reducer/A4Prise.ts

@@ -1,18 +1,18 @@
-import { GoodsTableType } from "@/types";
+import { PrizeTableType } from "@/types";
 
 // 初始化状态
 const initState = {
   // 列表数据
   tableInfo: {
-    list: [] as GoodsTableType[],
+    list: [] as PrizeTableType[],
     total: 0,
   },
 };
 
 // 定义 action 类型
 type GoodsActionType = {
-  type: "goods/getList";
-  payload: { list: GoodsTableType[]; total: number };
+  type: "prise/getList";
+  payload: { list: PrizeTableType[]; total: number };
 };
 
 // 频道 reducer
@@ -22,7 +22,7 @@ export default function goodsReducer(
 ) {
   switch (action.type) {
     // 获取列表数据
-    case "goods/getList":
+    case "prise/getList":
       return { ...state, tableInfo: action.payload };
     default:
       return state;

+ 31 - 0
houtai/src/store/reducer/TopicSetting.ts

@@ -0,0 +1,31 @@
+import { RulesTableType } from "@/types";
+
+// 初始化状态
+const initState = {
+  // 列表数据
+  tableInfo: {
+    list: [] as RulesTableType[],
+    total: 0,
+  },
+};
+
+// 定义 action 类型
+type GoodsActionType = {
+  type: "rules/getList";
+  payload: { list: RulesTableType[]; total: number };
+};
+
+
+// 频道 reducer
+export default function goodsReducer(
+  state = initState,
+  action: GoodsActionType
+) {
+  switch (action.type) {
+    // 获取列表数据
+    case "rules/getList":
+      return { ...state, tableInfo: action.payload };
+    default:
+      return state;
+  }
+}

+ 6 - 1
houtai/src/store/reducer/index.ts

@@ -6,6 +6,9 @@ import { combineReducers } from 'redux'
 import A1Rule from './A1Rule'
 import A0Layout from './layout'
 import A3User from './A3User'
+import A4Prise from './A4Prise'
+import TopicSetting from './TopicSetting'
+
 import A7Log from './A7Log'
 import A2Integral from './A2Integral'
 
@@ -14,8 +17,10 @@ const rootReducer = combineReducers({
   A1Rule,
   A0Layout,
   A3User,
+  A4Prise,
   A7Log,
-  A2Integral
+  A2Integral,
+  TopicSetting
 })
 
 // 默认导出

+ 3 - 1
houtai/src/types/api/A2Share.d.ts

@@ -1,4 +1,4 @@
-export type ShareDataAPIType = {
+export type IntegralTableAPIType = {
   createTime: string;
   creatorId: number;
   creatorName: string;
@@ -13,6 +13,8 @@ export type ShareDataAPIType = {
   pcsArea: number;
   sceneCode: string;
   updateTime: string;
+  explain: string;
+  type: string;
 };
 // export type ShareDataAPIType = {
 //   createTime: string;

+ 29 - 0
houtai/src/types/api/A4Prize.ts

@@ -0,0 +1,29 @@
+export type PrizeTableType = {
+  count: number;
+  createTime: string;
+  creatorId: null;
+  creatorName: string;
+  id: number;
+  isEnabled: number;
+  roleDesc: string;
+  roleKey: string;
+  roleName: string;
+  sort: string;
+  updateTime: string;
+  thumb: string;
+};
+
+export type PermissionsAPIType = {
+  authority: boolean;
+  id: number;
+  name: string;
+  parentId?: null;
+  resourceType?: string;
+};
+
+export type AddPrizeType = {
+  id: number | null;
+  roleName: string;
+  roleDesc: string;
+  resources: number[];
+};

+ 11 - 0
houtai/src/types/api/A6IDUser.ts

@@ -0,0 +1,11 @@
+export type IDUserTableType = {
+  createTime: string;
+  creatorId: null;
+  creatorName: string;
+  description: string;
+  id: number;
+  ip: string;
+  type: string;
+  updateTime: null;
+  userName: string;
+}

+ 38 - 0
houtai/src/types/api/TopicSetting.ts

@@ -0,0 +1,38 @@
+export type GoodsTableType = {
+  createTime: string;
+  creatorId: number;
+  creatorName: string;
+  description: string;
+  dictAge: string;
+  dictLevel: string;
+  dictSource: string;
+  dictTexture: string;
+  dirCode: string;
+  display: number;
+  fileIds: string;
+  id: number;
+  isBarrage: number;
+  name: string;
+  num: string;
+  thumb: string;
+  topic: string;
+  type: string;
+  updateTime: string;
+  tagType?: string;
+  tagCountry?: string;
+};
+
+export type FileListType = {
+  fileName?: string;
+  filePath?: string;
+  id?: number;
+  isFrame?: boolean;
+  done?: boolean;
+  type?: "model" | "img" | "audio" | "video";
+};
+
+export type FileImgListType = {
+  id: number;
+  fileName: string;
+  filePath: string;
+};

+ 3 - 1
houtai/src/types/index.d.ts

@@ -1,9 +1,11 @@
 export * from './api/layot'
 export * from './api/A1Rule'
 export * from './api/A1Goods'
+export * from './api/A2Integral'
 export * from './api/A3User'
 export * from './api/A4Role'
+export * from './api/A4Prize'
 export * from './api/A5Log'
-export * from './api/A2Share'
+export * from './api/A2Integral'