From a5b2428bc6ebac0210e4c552f61e7c5e1f1c9134 Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期四, 24 十一月 2022 15:25:48 +0800 Subject: [PATCH] 优化多项 --- web/web/GwClient.ashx | 27 ++++++++++++++++++++------- 1 files changed, 20 insertions(+), 7 deletions(-) diff --git a/web/web/GwClient.ashx b/web/web/GwClient.ashx index ccb85a6..8e59192 100644 --- a/web/web/GwClient.ashx +++ b/web/web/GwClient.ashx @@ -145,7 +145,8 @@ if (item.Is_Enable == 1) { //string loginStr = "http://" + serverIp + ":" + clientPort + "/Attachedlogin.aspx?action=Attachedlogin&account=" + item.Account + "&password=" + item.Password; - string loginStr = "http://" + serverIp + ":" + clientPort + "/Attachedlogin.aspx?action=Attachedlogin&account=" + item.Account ; + string token = DESEncrypt.Encrypt(item.Password);//瀵圭О鍔犲瘑 + string loginStr = "http://" + serverIp + ":" + clientPort + "/Attachedlogin.aspx?action=Attachedlogin&account=" + item.Account+"&token="+token ; str += string.Format("<a class=\"action-modal-login btn btn-success btn-xs \" href=\"javascript:;\" data-url=\"{0}\" data-id=\"{1}\" target=\"_blank\">", (object)loginStr, (object)item.ClientID); str += " 鐧诲綍</a> "; @@ -157,9 +158,9 @@ str += @"鐧藉悕鍗�"; str += @"</a> "; - str += string.Format(@"<a class=""action-modal-black btn btn-xs btn-primary"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); - str += @"榛戝悕鍗�"; - str += @"</a> "; + //str += string.Format(@"<a class=""action-modal-black btn btn-xs btn-primary"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); + //str += @"榛戝悕鍗�"; + //str += @"</a> "; //str += string.Format(@"<a class=""action-modal-resetPwd btn btn-xs btn-primary"" href=""javascript:;"" data-id=""{0}"">", item.ClientID); //str += @"閲嶇疆瀵嗙爜"; @@ -418,7 +419,7 @@ string financialStaff = context.GetString("financialStaff"); string chargeType = context.GetString("chargeType"); string smsStatusReport = context.GetString("smsStatusReport"); - string mmsStatusReport = context.GetString("mmsStatusReport"); + string isEnableWhite = context.GetString("isEnableWhite"); string isEnableBlack = context.GetString("isEnableBlack"); @@ -529,7 +530,7 @@ client.FinancialStaff = financialStaff; client.ChargeType = string.IsNullOrEmpty(chargeType) ? 0 : int.Parse(chargeType); client.SmsStatusReport = string.IsNullOrEmpty(smsStatusReport) ? 0 : int.Parse(smsStatusReport); - client.MmsStatusReport = string.IsNullOrEmpty(mmsStatusReport) ? 0 : int.Parse(mmsStatusReport); + client.IsEnableWhite = string.IsNullOrEmpty(isEnableWhite) ? 0 : int.Parse(isEnableWhite); client.IsEnableBlack = string.IsNullOrEmpty(isEnableBlack) ? 0 : int.Parse(isEnableBlack); @@ -552,6 +553,8 @@ ///鍒涘缓鏂板鎴� private JsonPageResult Save(PageContext<Model.SysUser> context) { + + //娴嬭瘯 string clientID = context.GetString("clientID"); string password = context.GetString("password"); string clientName = context.GetString("clientName"); @@ -593,6 +596,16 @@ if (string.IsNullOrEmpty(clientID)) { throw new ArgumentException("瀹㈡埛璐﹀彿涓嶈兘涓虹┖锛屼笖蹇呴』涓哄叕鍙稿悕绉帮紒"); + } + + if (address.Length >= 150) + { + throw new ArgumentException("鍦板潃闀垮害瓒呭嚭闄愬埗锛�"); + } + + if (string.IsNullOrEmpty(company)) + { + throw new AggregateException("鍏徃鍚嶇О涓嶈兘涓虹┖锛屼笖蹇呴』鏄叏绉�"); } if (string.IsNullOrEmpty(password) || !System.Text.RegularExpressions.Regex.IsMatch(password, @"[a-zA-Z0-9]{4,10}")) @@ -709,7 +722,7 @@ client.Telephone = telephone; client.Agent = agent; client.PermissionData = permissionData; - client.ParentId = context.OperatorID; + client.Client_Parentid = context.OperatorID; client.Certification_Status = 1; client.Company = company; client.CustomerManager = customerManager; -- Gitblit v1.9.1