|
|
@@ -173,11 +173,15 @@ const reducerRoutes=(state,action)=>{
|
|
|
userInfo=user;
|
|
|
//请求pay
|
|
|
// global.dispatch(reqPayConfig(user));
|
|
|
+ let sign=user.sign;
|
|
|
+ if (sign!=null)localStorageSet(LOCAL_SIGN,sign);
|
|
|
}
|
|
|
}
|
|
|
let conf=json.conf;
|
|
|
let hallServerUrl='';
|
|
|
let promoteInstall=0;
|
|
|
+ let guest=0;
|
|
|
+ let upgradeBonus=0;
|
|
|
if (conf){
|
|
|
if (!!conf.hall)hallServerUrl=conf.hall;
|
|
|
if (!!conf.DOLLAR)global.DOLLAR=conf.DOLLAR;
|
|
|
@@ -189,10 +193,13 @@ const reducerRoutes=(state,action)=>{
|
|
|
}
|
|
|
//promoteInstall
|
|
|
if (!!conf.promoteInstall)promoteInstall=conf.promoteInstall;
|
|
|
+ //guest
|
|
|
+ if (!!conf.guest)guest=conf.guest;
|
|
|
+ if (!!conf.upgradeBonus)upgradeBonus=conf.upgradeBonus;
|
|
|
}
|
|
|
//favorites
|
|
|
// let favorites=getFavorites(json.favorites);
|
|
|
- Object.assign(state, {routes:state.routes,asyncRoutes:data,styles:styles,blocks:blocks,...generData,isLogin:isLogin,userInfo:userInfo,hallServerUrl:hallServerUrl,promoteInstall:promoteInstall});
|
|
|
+ Object.assign(state, {routes:state.routes,asyncRoutes:data,styles:styles,blocks:blocks,...generData,isLogin:isLogin,userInfo:userInfo,hallServerUrl:hallServerUrl,promoteInstall:promoteInstall,guest:guest,upgradeBonus:upgradeBonus});
|
|
|
}
|
|
|
}
|
|
|
const routesStatus=(state,status,arg)=>{
|
|
|
@@ -464,16 +471,29 @@ export const Main=createSlice({
|
|
|
gameInfoStatus:REQ_STATUS.NONE,
|
|
|
customLeaveMsgStatus:REQ_STATUS.NONE,
|
|
|
customServiceStatus:REQ_STATUS.NONE,
|
|
|
+ //客服
|
|
|
customerInfo:[],
|
|
|
+ //大厅服务器
|
|
|
hallServerUrl:'',
|
|
|
+ //收藏列表
|
|
|
favorites:[],
|
|
|
+ //当前游戏id
|
|
|
gameID:0,
|
|
|
+ //服务器踢
|
|
|
serverKick:0,
|
|
|
+ //安装提示
|
|
|
promoteInstall:0,
|
|
|
+ //服务器返回777打开充值
|
|
|
openPay:0,
|
|
|
gameCardInfoStatus:REQ_STATUS.NONE,
|
|
|
+ //游戏卡信息
|
|
|
gameCardInfo:{},
|
|
|
+ //otp 时间戳
|
|
|
otpTimeStamp:0,
|
|
|
+ //是否是guest登录
|
|
|
+ guest:0,
|
|
|
+ //绑定奖励
|
|
|
+ upgradeBonus:0
|
|
|
},
|
|
|
reducers: {
|
|
|
logout:(state, action)=>{
|
|
|
@@ -756,6 +776,12 @@ export const getGameCardInfo=(id)=>(state)=>{
|
|
|
id=Number(id);
|
|
|
return state.main.gameCardInfo[id];
|
|
|
}
|
|
|
+export const getIsGuest=(state)=>{
|
|
|
+ return state.main.guest;
|
|
|
+}
|
|
|
+export const getUpgradeBonus=(state)=>{
|
|
|
+ return state.main.upgradeBonus;
|
|
|
+}
|
|
|
//数据获取
|
|
|
export default Main.reducer;
|
|
|
|