protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as GiftListPanelData ?? new GiftListPanelData();

            RequestGoodList();

            BtnBack.OnClickAsObservable().Subscribe(_ => {
                Back();
                AudioManager.PlaySound("Button_Audio");
            }).AddTo(this);
            BtnIntegral.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <IntegralDetailPanel>(new IntegralDetailPanelData(), UITransitionType.CIRCLE, this);
            }).AddTo(this);
        }
Exemple #2
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as DailyTaskPanelData ?? new DailyTaskPanelData();

            RequestDailyTask();
            RequestMedalList();

            if (mData.showMedal == 2)
            {
                ToggleDailyTask.isOn  = false;
                ToggleDailyMedal.isOn = true;
            }
            else
            {
                ToggleDailyTask.isOn  = true;
                ToggleDailyMedal.isOn = false;
            }

            BtnBack.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                Back();
            }).AddTo(this);
            BtnIntegralRule.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <IntegralDescripPanel>(new IntegralDescripPanelData()
                {
                    mMedalsLiast = this.mMedalsLiast
                }, UITransitionType.CIRCLE);
            }).AddTo(this);

            BtnIntegral.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <IntegralDetailPanel>(new IntegralDetailPanelData()
                {
                    panelToggleType = 2,
                }, UITransitionType.CIRCLE, this);
            }).AddTo(this);

            /// 签到规则
            BtnTaskRule.OnClickAsObservable().Subscribe(_ => {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <AttendanceRulePanel>(new AttendanceRulePanelData(), UITransitionType.CIRCLE, this);
            }).AddTo(this);
            // 勋章规则
            BtnMedalRule.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <IntegralDescripPanel>(new IntegralDescripPanelData()
                {
                    mMedalsLiast = this.mMedalsLiast
                }, UITransitionType.CIRCLE);
            }).AddTo(this);

            BtnAttendance.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                Debug.Log("点击签到");
                RequestAttendance();
            }).AddTo(this);

            BtnPunch.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                Debug.Log("学习任务打卡 前往");
                // CommonUtil.toast("此功能尚未开放,敬请期待");

                // Back();
                UIMgr.OpenPanel <AttendanceSelectPanel>(new AttendanceSelectPanelData(), UITransitionType.NULL);
            }).AddTo(this);

            BtnExchange.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <GiftListPanel>(new GiftListPanelData(), UITransitionType.CIRCLE);
            }).AddTo(this);
        }