|
@@ -2,6 +2,7 @@ import { initTrackAll ,trackEvent} from "../tracking/TrackAll"
|
|
|
import {createAsyncThunk, createSlice} from "@reduxjs/toolkit";
|
|
import {createAsyncThunk, createSlice} from "@reduxjs/toolkit";
|
|
|
import {routes} from "@db/routes";
|
|
import {routes} from "@db/routes";
|
|
|
import {
|
|
import {
|
|
|
|
|
+ ROUTE_PATH,
|
|
|
ROUTE_TYPE_CUSTOM,
|
|
ROUTE_TYPE_CUSTOM,
|
|
|
ROUTE_TYPE_FULL,
|
|
ROUTE_TYPE_FULL,
|
|
|
ROUTE_TYPE_IN,
|
|
ROUTE_TYPE_IN,
|
|
@@ -475,6 +476,13 @@ export const Main=createSlice({
|
|
|
},
|
|
},
|
|
|
updateOpenPay:(state,action)=>{
|
|
updateOpenPay:(state,action)=>{
|
|
|
state.openPay=action.payload;
|
|
state.openPay=action.payload;
|
|
|
|
|
+ },
|
|
|
|
|
+ updateGameRoute:(state,action)=> {
|
|
|
|
|
+ let route = state.allMap[ROUTE_PATH.GAME + "/*"];
|
|
|
|
|
+ if (route != null) {
|
|
|
|
|
+ let type = action.payload;
|
|
|
|
|
+ route.type = type;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
extraReducers: (builder) => {
|
|
extraReducers: (builder) => {
|
|
@@ -495,7 +503,7 @@ export const Main=createSlice({
|
|
|
buildReqReducer(builder,reqFavoGet,reducerFavoGet,null);
|
|
buildReqReducer(builder,reqFavoGet,reducerFavoGet,null);
|
|
|
},
|
|
},
|
|
|
})
|
|
})
|
|
|
-export const {logout,updateUserInfo,updateUserScore,updateAddScore,updateGameLike,updateCurrGame,updateServerKick,updateOpenPay} = Main.actions;
|
|
|
|
|
|
|
+export const {logout,updateUserInfo,updateUserScore,updateAddScore,updateGameLike,updateCurrGame,updateServerKick,updateOpenPay,updateGameRoute} = Main.actions;
|
|
|
//数据获取
|
|
//数据获取
|
|
|
export const getFetchStatus=(state)=>{
|
|
export const getFetchStatus=(state)=>{
|
|
|
return state.main.status;
|
|
return state.main.status;
|