|
@@ -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 {
|