Ver Fonte

游戏路由不弹自定义安装栏

zhejiushizhuce há 2 anos atrás
pai
commit
28235294a9
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      src/App.js

+ 6 - 0
src/App.js

@@ -78,6 +78,9 @@ import {ROUTE_PATH} from "@constants/routes";
 import {onChangeUser, onChangeUserID} from "@features/actions/mainAction";
 import {isInAppBrowser, isShowInstallBox, openUrlUseChrome} from "@utils/UAUtils";
 import WInstallBox from "@widgets/WInstallBox";
+const objInfo={
+    gameID:0
+}
 const App = () => {
     const dispatch = useDispatch();
     const fetchStatus=useSelector(getFetchStatus);
@@ -246,6 +249,8 @@ const App = () => {
             // time=1000;
             setTimeout(async ()=>{
                 if (!isShowInstallBox())return;
+                let gameID=Number(objInfo.gameID);
+                if (gameID>0)return;
                 global.showInstallBox();
             },time);
         }
@@ -304,6 +309,7 @@ const App = () => {
     useEffect(()=>{
         dispatch(updateCurrGame(gameID))
         dispatch(hallSendState());
+        objInfo.gameID=gameID;
     },[gameID])
     //监听被服务器踢掉
     useEffect(()=>{