少年修仙传客户端代码仓库
client_linchunjie
2018-09-25 78bfe524ea4776c47f6314e56e97f39970b00fce
System/SystemSetting/ActivityPushCell.cs
@@ -12,6 +12,7 @@
        [SerializeField] GameObject bgObj;
        SetPrivateModel privateModel { get { return ModelCenter.Instance.GetModel<SetPrivateModel>(); } }
        DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
        public void SetModel(int dailyId)
        {
@@ -22,10 +23,11 @@
            nameText.text = title;
            weekDayText.text = weekDay;
            timeText.text = openTime;
            int index = privateModel.GetSwitchIndexById(dailyId);
            var quests = dailyQuestModel.GetDailyQuests(DailyQuestModel.DailyQuestCategory.TimeLimit);
            int index = privateModel.GetSwitchIndexById(dailyId, quests);
            pushBtn.SetInit(index,privateModel.GetSwitchStateByIndex(index));
            pushBtn.switchBtn.RemoveAllListeners();
            pushBtn.switchBtn.AddListener(() =>
            pushBtn.switchBtn.SetListener(() =>
            {
                if (pushBtn.onObj.activeInHierarchy)
                {
@@ -41,14 +43,7 @@
                }
            });
            if(this.index % 2 == 0)
            {
                bgObj.SetActive(true);
            }
            else
            {
                bgObj.SetActive(false);
            }
            bgObj.SetActive(this.index % 2 == 0);
        }
    }
}