Ver código fonte

feat: 放开

year 1 mês atrás
pai
commit
401a5115a0
1 arquivos alterados com 13 adições e 13 exclusões
  1. 13 13
      src/app/[locale]/(TabBar)/deposit/page.tsx

+ 13 - 13
src/app/[locale]/(TabBar)/deposit/page.tsx

@@ -33,16 +33,16 @@ const Deposit = () => {
         getInfo(id);
     }, [actIdx, shopTypeList]);
 
-    React.useEffect(() => {
-        if ((!shopInfo || (shopInfo.id === 1 && shopInfo.num <= 0)) && !isInit) {
-            setShopTypeList((listValue) => {
-                return listValue.filter((item) => {
-                    return item.id !== 1;
-                });
-            });
-        }
-        // eslint-disable-next-line react-hooks/exhaustive-deps
-    }, [shopInfo]);
+    // React.useEffect(() => {
+    //     if ((!shopInfo || (shopInfo.id === 1 && shopInfo.num <= 0)) && !isInit) {
+    //         setShopTypeList((listValue) => {
+    //             return listValue.filter((item) => {
+    //                 return item.id !== 1;
+    //             });
+    //         });
+    //     }
+    //     // eslint-disable-next-line react-hooks/exhaustive-deps
+    // }, [shopInfo]);
 
     const getData = async () => {
         const res = await getShopListApi();
@@ -90,9 +90,9 @@ const Deposit = () => {
                 res.data.products.sort((a: any, b: any) => {
                     return a.order - b.order;
                 });
-                if (res?.data.id === 1 && res?.data.num === 0) {
-                    res.data.products = [];
-                }
+                // if (res?.data.id === 1 && res?.data.num === 0) {
+                //     res.data.products = [];
+                // }
                 setShopInfo(res?.data || {});
             }
         } catch {