Sfoglia il codice sorgente

Route 内解析bonus_pack

zhejiushizhuce 2 anni fa
parent
commit
121bc8ec16
2 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 4 1
      src/features/api.js
  2. 1 1
      src/widgets/WWelfarebar/index.jsx

+ 4 - 1
src/features/api.js

@@ -88,7 +88,7 @@ export const buildReqReducer=(builder,thunk,callback,statusCB=null)=>{
 //路由
 export const reqGetRoutes = createAsyncThunk(
     APP_ROUTES,
-    async (thunkAPI) => {
+    async (arg,thunkAPI) => {
         let params={
             url:APP_ROUTES,
             params:{
@@ -103,6 +103,9 @@ export const reqGetRoutes = createAsyncThunk(
             params.params.ia=ia;
         }
         const response = await Http.get(params)
+        if (response&&response.user!=null){
+            thunkAPI.dispatch(updateBonusPack(response.user));
+        }
         return response;
     },
 )

+ 1 - 1
src/widgets/WWelfarebar/index.jsx

@@ -191,7 +191,7 @@ const WWelfarebar = () => {
         let UserID=user.UserID;
         if (UserID>0){
             dispatch(reqProtectCheck());
-            dispatch(reqGameInfo());
+            // dispatch(reqGameInfo());
         }
         dispatch(reqRechargeConfig());
         // dispatch(reqFirstPayConfig());