diff --git a/SGGL/FineUIPro.Web/ZHDD/ZHDD.aspx.cs b/SGGL/FineUIPro.Web/ZHDD/ZHDD.aspx.cs index 65d76e12..ccd52814 100644 --- a/SGGL/FineUIPro.Web/ZHDD/ZHDD.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHDD/ZHDD.aspx.cs @@ -13,7 +13,7 @@ namespace FineUIPro.Web.ZHDD { public partial class ZHDD : PageBase { - + #region 加载页面 /// @@ -28,26 +28,20 @@ namespace FineUIPro.Web.ZHDD var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId); string username = project.AQMAccount;// "bruce"; string password = project.AQMPwd;// "Admin!@%2316891#16891"; - var res1 = APIGetHttpService.Http("https://aqm.cwcec.com/api/index.php", "POST", "application/x-www-form-urlencoded", null, "ctl=tool&act=get_pkey&user_name=" + username + "&pwd=" + password); - if (!string.IsNullOrWhiteSpace(res1)) - { - var j1 = JsonConvert.DeserializeObject(res1); - string data = j1.data; + var res1 = APIGetHttpService.Http("https://aqm.cwcec.com/api/index.php", "POST", "application/x-www-form-urlencoded", null,"ctl=tool&act=get_pkey&user_name=" + username + "&pwd="+ password); + var j1 = JsonConvert.DeserializeObject(res1); + string data = j1.data; - var res2 = APIGetHttpService.Http("https://aqm.cwcec.com/api/index.php?ctl=tool&act=get_token&user_name=" + username + "&pkey=" + j1.data, "POST"); - if (!string.IsNullOrWhiteSpace(res2)) - { - var j2 = JsonConvert.DeserializeObject(res2); - string session_id = j2.session_id; - string token = j2.token; - ifZHDD.Src = "https://aqm.cwcec.com/login/#token=" + session_id + "&user_name=" + username + "&=home"; - } - } + var res2 = APIGetHttpService.Http("https://aqm.cwcec.com/api/index.php?ctl=tool&act=get_token&user_name=" + username + "&pkey="+j1.data, "POST"); + var j2 = JsonConvert.DeserializeObject(res2); + string session_id = j2.session_id; + string token = j2.token; + ifZHDD.Src = "https://aqm.cwcec.com/login/#token=" + session_id+"&user_name=" + username + "&=home"; } } - #endregion - + #endregion + } } \ No newline at end of file