Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!IsPostBack)
                {
                    StringBuilder strJs = new StringBuilder();
                    strJs.Append("请您先进行登录!");
                    strJs.AppendFormat("<script>settimeout(window.location='{0}', 2000);</script>", "http://" + Request.ServerVariables["SERVER_NAME"]);

                    //从MQ广告登录到web页面,考虑安全性,因此在过了广告期后,不再执行以下代码
                    //zhangzy   2010-3-1
                    //Response.Write(strJs.ToString());
                    //Response.End();
                    //return;

                    TourUnion.Account.Model.Login.LoginResultInfo resultinfo = TourUnion.WEB.IM.LoginWeb.LoginWebMQPublic(false, false, TourUnion.Account.Enum.SystemMedia.Web);
                    bool   isTrue = resultinfo.IsSucceed;
                    string error  = resultinfo.ErrorInfo.ToString();
                    resultinfo = null;
                    //判断有无登录成功,并跳转
                    if (isTrue)
                    {
                        Response.Redirect(Request.QueryString["CsToBsRedirectUrl"], true);
                    }
                    else
                    {
                        strJs.Insert(0, error.ToString());
                    }
                }
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TourUnion.Account.Model.Login.LoginResultInfo resultinfo = TourUnion.WEB.IM.LoginWeb.LoginWebMQPublic(true, true, TourUnion.Account.Enum.SystemMedia.MQ);

                isTrue = resultinfo.IsSucceed;  //登录成功
                if (isTrue)
                {
                    url = resultinfo.RedirectUrl;
                }
                else
                {
                    url = resultinfo.ErrorInfo.ToString();
                }

                resultinfo = null;
            }
        }