private void StartActivityReq(UserEncourageActVo vo) { // Debug.LogError("活动Id为"+vo.Id); LoadingOverlay.Instance.Show(); var buffer = NetWorkManager.GetByteData(new StartReq() { Id = vo.Id, ActId = vo.ActId }); NetWorkManager.Instance.Send <StartRes>(CMD.SUPPORTERACTIVITY_START, buffer, OnStartActivityRes); }
public void GetMyEncourageActs(List <UserEncourageActPB> userEncourageActPbs) { if (UserEncourageActVos == null) { UserEncourageActVos = new List <UserEncourageActVo>(); } UserEncourageActVos.Clear(); foreach (var v in userEncourageActPbs) { UserEncourageActVo vo = new UserEncourageActVo(v); UserEncourageActVos.Add(vo); } }
public void SetData(UserEncourageActVo vo) { _fansDetailController.SetData(vo); _curUserEncourageActVo = vo; }
public void SetData(UserEncourageActVo vo) { _curUserEncourageActVo = vo; View.SetData(vo, SupporterActivityModel); }
public void SetActChange(UserEncourageActVo vo) { _activityChooseController.OnRefeshReq(vo); }
public void UpdateEncourageActs(UserEncourageActPB userEncourageActVo, int replaceId = 0) { if (UserEncourageActVos == null) { Debug.LogError("BUG!USERdata is null"); return; } foreach (var v in UserEncourageActVos) { // Debug.LogError(userEncourageActVo); if (v.ActId == userEncourageActVo.ActId) { v.Id = userEncourageActVo.Id; v.UserId = userEncourageActVo.UserId; v.AcceptTime = userEncourageActVo.AcceptTime; v.AwardState = userEncourageActVo.AwardState; //Debug.LogError("userEncourageActVo.AwardState"+userEncourageActVo.AwardState); v.ImmediateFinishState = userEncourageActVo.ImmediateFinishState; if (v.ImmediateFinishState == 1) { // Debug.LogError("ImmediateFinishState"); } v.StartState = userEncourageActVo.StartState; v.UserId = userEncourageActVo.UserId; RefreshUserStartActItem = v; return; } } if (replaceId != userEncourageActVo.ActId) { // Debug.LogError("replace new task!"); var removeItem = UserEncourageActVos.Find(x => x.ActId == replaceId); // UserEncourageActVos.Remove(removeItem); // UserEncourageActVo vo=new UserEncourageActVo(userEncourageActVo); // UserEncourageActVos.Add(vo); foreach (var v in UserEncourageActVos) { if (v.ActId == replaceId) { v.ActId = userEncourageActVo.ActId; v.Id = userEncourageActVo.Id; v.UserId = userEncourageActVo.UserId; v.AcceptTime = userEncourageActVo.AcceptTime; v.AwardState = userEncourageActVo.AwardState; //Debug.LogError("userEncourageActVo.AwardState"+userEncourageActVo.AwardState); v.ImmediateFinishState = userEncourageActVo.ImmediateFinishState; if (v.ImmediateFinishState == 1) { // Debug.LogError("ImmediateFinishState"); } v.StartState = userEncourageActVo.StartState; v.NeedToChangeAni = false; v.CanReceiveAward = false; RefreshUserStartActItem = v; } } // Debug.LogError(UserEncourageActVos.Count); } }