public ActionResult ShowNoticeReg(string id) { string code = Request.QueryString["code"]; QYConfig.RegistWX(); var accessToken = AccessTokenContainer.GetToken(QYConfig.CorpId); GetUserIdResult user = OAuth2Api.GetUserId(accessToken, code, QYConfig.VoteAgenID); QYMemberBL member = QYMemberBL.GetMemberByWXID(user.UserId); NoticeBL n = NoticeBL.CreateNotice(id); if (n != null && member != null) { member.ReadNotice(id); } return(View(n)); }
public ActionResult VoteMobel(string id) { string code = Request.QueryString["code"]; QYConfig.RegistWX(); var accessToken = AccessTokenContainer.GetToken(QYConfig.CorpId); GetUserIdResult user = OAuth2Api.GetUserId(accessToken, code, QYConfig.VoteAgenID); QYMemberBL member = QYMemberBL.GetMemberByWXID(user.UserId); ViewBag.userid = member.ID; ViewBag.vid = id; MemberVote mv = new MemberVote(member.ID.ToString(), id); ViewBag.mv = mv; VoteBL v = VoteBL.GetVote(id); return(View(v)); }