예제 #1
0
        /// <summary>
        /// 确定聚会
        /// </summary>
        public ActionResult ConfirmParty(int partyId, string code, string state)
        {
            if (string.IsNullOrEmpty(code))
            {
                return(Content("无法获取当前用户信息。"));
            }
            else
            {
                var accessTokenInfo = WeChatHelper.WeChat.GetWeChatAccessTokenInfo_OAuth(code);

                try
                {
                    var confirmPartyInfo = PartyService.ConfirmParty(partyId, accessTokenInfo.openid);

                    var model = new ConfirmPartyViewModel
                    {
                        ConfirmPartyInfo = confirmPartyInfo
                    };

                    return(View(model));
                }
                catch (BasicSystemException ex)
                {
                    return(Content(ex.ToLocalize()));
                }
            }
        }