From f788a1e320b8505435ed66e2456ddb2d0a838f76 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 19 十一月 2020 19:58:14 +0800
Subject: [PATCH] 2020-11-19 1.优化绑定和解绑页面。2.修改密码功能实现,UI界面实现,接口实现。

---
 HDL_ON/DAL/Server/HttpUtil.cs |   34 ++++++++++++++++++++++------------
 1 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 1deb23f..154e4b3 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -12,10 +12,6 @@
     public class HttpUtil
     {
         #region HttpUtil 鍏ㄥ眬甯搁噺
-        /// <summary>
-        /// 璇锋眰鎴愬姛鐨勭姸鎬佺爜
-        /// </summary>
-        public const string SUCCESS_CODE = "0";
         ///// <summary>
         ///// API_HTTPS
         ///// </summary>
@@ -208,20 +204,20 @@
                     }
                     catch (Exception ex)
                     {
-                        HDL_ON.Common.Utlis.WriteLine(ex.Message);
+                        HDL_ON.Utlis.WriteLine(ex.Message);
                         return new ResponsePackNew() { Code = "DATA_EXCEPTION" };
                     }
                 }
                 else
                 {
-                    HDL_ON.Common.Utlis.WriteLine(response.Content);
+                    HDL_ON.Utlis.WriteLine(response.Content);
                     return new ResponsePackNew() { Code = "NETWORK_ERROR" };
                 }
 
             }
             catch (Exception ex)
             {
-                HDL_ON.Common.Utlis.WriteLine(ex.Message);
+                HDL_ON.Utlis.WriteLine(ex.Message);
                 return new ResponsePackNew() { Code = "NETWORK_ERROR" };
             }
 
@@ -289,7 +285,7 @@
             }
             catch (Exception ex)
             {
-                HDL_ON.Common.Utlis.WriteLine(ex.Message);
+                HDL_ON.Utlis.WriteLine(ex.Message);
                 return null;
             }
             #endregion
@@ -380,20 +376,20 @@
                     }
                     catch (Exception ex)
                     {
-                        HDL_ON.Common.Utlis.WriteLine(ex.Message);
+                        HDL_ON.Utlis.WriteLine(ex.Message);
                         return new ResponsePackNew() { Code = "DATA_EXCEPTION" };
                     }
                 }
                 else
                 {
-                    HDL_ON.Common.Utlis.WriteLine(response.Content);
+                    HDL_ON.Utlis.WriteLine(response.Content);
                     return new ResponsePackNew() { Code = "NETWORK_ERROR" };
                 }
 
             }
             catch (Exception ex)
             {
-                HDL_ON.Common.Utlis.WriteLine(ex.Message);
+                HDL_ON.Utlis.WriteLine(ex.Message);
                 return new ResponsePackNew() { Code = "NETWORK_ERROR" };
             }
 
@@ -459,11 +455,25 @@
                     string str = string.Empty;
                     foreach (KeyValuePair<string, object> item in paramDictionary)
                     {
+                        //Value涓簄ull涓嶅弬鍔犳牎楠�
                         if (item.Value != null)
                         {
-                            str += item.Key + "=" + item.Value.ToString() + "&";
+                            //Value.ToString()涓簄ull鎴栬��""涔熶笉鍙傚姞鏍¢獙
+                            if (!string.IsNullOrEmpty(item.Value.ToString()))
+                            {
+                                //濡傛灉鏄痓ool绫诲瀷锛岃杞皬鍐�
+                                if (item.Value is bool)
+                                {
+                                    str += item.Key + "=" + item.Value.ToString().ToLower() + "&";
+                                }
+                                else
+                                {
+                                    str += item.Key + "=" + item.Value.ToString() + "&";
+                                }
+                            }
                         }
                     }
+
                     //2.3 鎷兼帴SECRET_KEY
                     str = str.Substring(0, str.Length - 1) + SECRET_KEY;
                     //2.4 MD5杞崲+杞皬鍐�

--
Gitblit v1.8.0