Beispiel #1
0
        /// <summary>
        /// 去完成
        /// </summary>
        public void GoToTask()
        {
            if (_data == null)
            {
                return;
            }

            var action   = _data.extra_action;
            var taskCode = _data.task_code;

            if (action == null)
            {
                return;
            }

            UserTaskDialog.Hide();

            switch (action.type)
            {
            case ExtraActionType.SHOW_DIALOG:
                _dialogManager.ShowDialog <UIWindow>(action.dialog_name);
                break;

            case ExtraActionType.AWARD:
                _remoteApi.RequestAward(action.award_type, action.award_code);
                break;

            case ExtraActionType.GOTO_ROOM:
                _remoteApi.ChooseRoom((int)action.room_id);
                break;

            case ExtraActionType.WE_CHAT_SHARE:
                var shareContent = new ShareContent(ShareResultType.TaskCode, taskCode);
                var content      = JsonUtility.ToJson(shareContent);
                if (action.wx_share_type == WxShareType.WxShare)
                {
                    _weChatManager.WxShare(action.wx_url, action.wx_img_url, null, action.wx_title,
                                           action.wx_content,
                                           action.wx_thumb_url, content);
                }
                else if (action.wx_share_type == WxShareType.WxCircle)
                {
                    _weChatManager.WxCircle(action.wx_url, action.wx_img_url, null, action.wx_title,
                                            action.wx_content,
                                            action.wx_thumb_url, content);
                }

                break;

            default: break;
            }
        }
Beispiel #2
0
        public void DoShare(bool circle)
        {
            if (circle)
            {
                _weChatManager.WxCircle(_url, _imgUrl, _imgPath, _title, _content, _thumbUrl, _awardCode);
            }
            else
            {
                _weChatManager.WxShare(_url, _imgUrl, _imgPath, _title, _content, _thumbUrl, _awardCode);
            }

            Hide();
        }