protected override void OnInit(System.EventArgs e) { base.OnInit(e); if (Fetch.GetTerminalType(this.Page.Request) != 0 && !this.Page.Request.Url.AbsoluteUri.ToLower().Contains("mobile")) { base.Response.Redirect("/Mobile/Index.aspx"); } if (this.IsAuthenticatedUser) { this.UserLogon(); } else { if (this.IsOnLine) { this.userTicket = Fetch.GetUserCookie(); } } this.SetStyle(); }
/// <summary> /// 初始化并验证用户身份 /// </summary> /// <param name="e"></param> protected override void OnInit(EventArgs e) { base.OnInit(e); if (Fetch.GetTerminalType(Page.Request) != 0 && Page.Request.Url.AbsoluteUri.ToLower().Contains("mobile") == false) { Response.Redirect("/Mobile/Index.aspx"); } if (IsAuthenticatedUser) { UserLogon(); } else if (IsOnLine) { //在线 刷新 Cookie userTicket = Fetch.GetUserCookie(); } SetStyle(); }