private void GetCardAward(SevenSigninTemplateAwardVo vo) { GainSevenDayAwardReq req = new GainSevenDayAwardReq { ActivityId = vo.ActivityId, }; byte[] data = NetWorkManager.GetByteData(req); NetWorkManager.Instance.Send <GainSevenDayAwardRes>(CMD.ACTIVITY_GAINSEVENDAYAWARD, data, res => { RewardUtil.AddReward(res.Awards); _model.UpdateUserSevenDaySigninTemplateInfo(res.UserSevenDaySigninIndo); _model.UpdateSevenDayAwardList(res.UserSevenDaySigninIndo.SignDay); View.Refresh(vo.DayId);//刷新特殊处理下 SendMessage(new Message(MessageConst.CMD_ACTIVITY_REFRESH_ACTIVITYTOGGLE_REDDOT)); Action finish = () => { SendMessage(new Message(MessageConst.CMD_ACTIVITY_SHOW_BAR_AND_BACKBTN)); }; SendMessage(new Message(MessageConst.CMD_ACTIVITY_HINT_BAR_AND_BACKBTN)); List <AwardPB> temp = res.Awards.ToList(); ModuleManager.Instance.EnterModule(ModuleConfig.MODULE_DRAWCARD, false, false, "DrawCard_CardShow", temp, finish, false); }); }
/// <summary> /// 发生七日引导第一天请求 /// </summary> private void ActivityGuide() { var curActivity = GlobalData.ActivityModel.GetActivityVo(ActivityType.ActivitySevenDaySignin); if (curActivity == null) { FlowText.ShowMessage(I18NManager.Get("Common_ActivityPastDue")); return; } else { if (curActivity.IsActivityPastDue) { FlowText.ShowMessage(I18NManager.Get("Common_ActivityPastDue")); return; } } var activityId = curActivity.ActivityId; GainSevenDayAwardReq req = new GainSevenDayAwardReq { ActivityId = activityId }; byte[] data = NetWorkManager.GetByteData(req); NetWorkManager.Instance.Send <GainSevenDayAwardRes>(CMD.ACTIVITY_GAINSEVENDAYAWARD, data, res => { RewardUtil.AddReward(res.Awards); _model.UpdateUserSevenDaySigninInfo(res.UserSevenDaySigninIndo); _model.UpdateSevenDayAwardList(res.UserSevenDaySigninIndo.SignDay); View.Refresh(1); SendMessage(new Message(MessageConst.CMD_ACTIVITY_REFRESH_ACTIVITYTOGGLE_REDDOT)); }); }
private void GetNormalAward(SevenSigninTemplateAwardVo vo) { GainSevenDayAwardReq req = new GainSevenDayAwardReq { ActivityId = vo.ActivityId, }; byte[] data = NetWorkManager.GetByteData(req); NetWorkManager.Instance.Send <GainSevenDayAwardRes>(CMD.ACTIVITY_GAINSEVENDAYAWARD, data, res => { RewardUtil.AddReward(res.Awards); _model.UpdateUserSevenDaySigninTemplateInfo(res.UserSevenDaySigninIndo); _model.UpdateSevenDayAwardList(res.UserSevenDaySigninIndo.SignDay); View.Refresh(vo.DayId);//刷新特殊处理下 SendMessage(new Message(MessageConst.CMD_ACTIVITY_REFRESH_ACTIVITYTOGGLE_REDDOT)); OpenNormalAwardWindow(vo); }); }
/// <summary> /// 领取卡的请求,防止策划以后配成卡 /// </summary> /// <param name="vO"></param> private void GetCardAward(SevenDaysLoginAwardVO vO) { var curActivity = GlobalData.ActivityModel.GetActivityVo(ActivityType.ActivitySevenDaySignin); if (curActivity == null) { FlowText.ShowMessage(I18NManager.Get("Common_ActivityPastDue")); return; } else { if (curActivity.IsActivityPastDue) { FlowText.ShowMessage(I18NManager.Get("Common_ActivityPastDue")); return; } } GainSevenDayAwardReq req = new GainSevenDayAwardReq { ActivityId = vO.ActivityId, }; byte[] data = NetWorkManager.GetByteData(req); NetWorkManager.Instance.Send <GainSevenDayAwardRes>(CMD.ACTIVITY_GAINSEVENDAYAWARD, data, res => { RewardUtil.AddReward(res.Awards); _model.UpdateUserSevenDaySigninInfo(res.UserSevenDaySigninIndo); _model.UpdateSevenDayAwardList(res.UserSevenDaySigninIndo.SignDay); View.Refresh(vO.DayId);//刷新特殊处理下 SendMessage(new Message(MessageConst.CMD_ACTIVITY_REFRESH_ACTIVITYTOGGLE_REDDOT)); Action finish = () => { SendMessage(new Message(MessageConst.CMD_ACTIVITY_SHOW_BAR_AND_BACKBTN)); }; SendMessage(new Message(MessageConst.CMD_ACTIVITY_HINT_BAR_AND_BACKBTN)); List <AwardPB> temp = res.Awards.ToList(); ModuleManager.Instance.EnterModule(ModuleConfig.MODULE_DRAWCARD, false, false, "DrawCard_CardShow", temp, finish, false); }); }