public static bool CheckLogin() { if (CurrentUserID.IsEmptyGuid()) { if (Config.IsUse) { HttpContext.Current.Response.Cookies.Add(new HttpCookie("LastURL", HttpContext.Current.Request.Url.PathAndQuery)); string url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + Config.CorpID + "&redirect_uri=" + Config.GetAccountUrl + "&response_type=code&scope=snsapi_base&state=a#wechat_redirect"; HttpContext.Current.Response.Redirect(url); } return(false); } return(true); }