Forráskód Böngészése

🐛馆藏编辑时间处理

shaogen1995 2 éve
szülő
commit
2d5314c288

+ 3 - 20
houtai/src/pages/B2Goods/index.tsx

@@ -2,7 +2,6 @@ import { RootState } from "@/store";
 import {
   getGoodsListDeriveAPI,
   getGoodsListAPI,
-  goodsDisplayAPI,
   goodsRemoveAPI,
   goodsBarrageAPI,
 } from "@/store/action/B2Goods";
@@ -234,16 +233,6 @@ function Goods() {
     [tableSelect]
   );
 
-  // 切换表格中的启用停用状态
-  const isEnabledClickFu = useCallback(
-    async (val: boolean, id: number) => {
-      const isDisable = val ? 1 : 0;
-      const res = await goodsDisplayAPI(id, isDisable);
-      if (res.code === 0) getList();
-    },
-    [getList]
-  );
-
   // 切换表格中的弹幕留言开启和关闭
   const isBarrageFu = useCallback(
     async (val: boolean, id: number) => {
@@ -335,14 +324,8 @@ function Goods() {
       },
       {
         title: "展示状态",
-        render: (item: GoodsTableType) => (
-          <Switch
-            checkedChildren="启用"
-            unCheckedChildren="停用"
-            checked={item.display === 1}
-            onChange={(val) => isEnabledClickFu(val, item.id!)}
-          />
-        ),
+        render: (item: GoodsTableType) =>
+          item.display === 1 ? "展示" : "不展示",
       },
       {
         title: "弹幕留言",
@@ -385,7 +368,7 @@ function Goods() {
         ),
       },
     ];
-  }, [delTableFu, downTableImgFu, isBarrageFu, isEnabledClickFu]);
+  }, [delTableFu, downTableImgFu, isBarrageFu]);
 
   // 弹幕设置的弹窗
   const [barrage, setBarrage] = useState(false);

+ 2 - 2
houtai/src/pages/B5Topic/index.tsx

@@ -217,7 +217,7 @@ function Topic() {
           <span>题目标题:</span>
           <Input
             key={inputKey}
-            maxLength={25}
+            maxLength={100}
             style={{ width: 200 }}
             placeholder="请输入关键字"
             allowClear
@@ -228,7 +228,7 @@ function Topic() {
           <span>关联文物:</span>
           <Input
             key={inputKey}
-            maxLength={10}
+            maxLength={25}
             style={{ width: 200 }}
             placeholder="请输入关键字"
             allowClear

+ 1 - 1
houtai/src/pages/C3Log/index.tsx

@@ -97,7 +97,7 @@ function Log() {
           <div className="row">
             <span>账号:</span>
             <Input
-              maxLength={10}
+              maxLength={15}
               style={{ width: 150 }}
               placeholder="请输入"
               allowClear