From f4a1be66a1b64705d490bc0ad06f64e7c6737acd Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 29 六月 2023 10:06:43 +0800
Subject: [PATCH] 1

---
 WebAPI/InvokeHelper.cs |   22 ++++++++--------------
 1 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/WebAPI/InvokeHelper.cs b/WebAPI/InvokeHelper.cs
index ecfacd8..11d42d2 100644
--- a/WebAPI/InvokeHelper.cs
+++ b/WebAPI/InvokeHelper.cs
@@ -4,33 +4,27 @@
 using System.Text;
 using System.Threading.Tasks;
 using Newtonsoft.Json;
+using WebAPI.Utility;
 
 namespace WebAPI
 {
     public static class InvokeHelper
     {
-        //private static string CloudUrl = "http://localhost/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃
-        //private static string CloudUrl = "http://60.190.4.42:9002/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃
-        //private static string CloudUrl = "http://47.96.97.237/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃
-        //private static string CloudUrl = "http://60.190.4.42:9002/K3CLOUD/";//澶忓疂
-        private static string CloudUrl = "http://192.168.1.238:9002/K3CLOUD/";//澶忓疂
-
-
-
+        private static string CloudUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "KDApiUrl");//K/3 Cloud 涓氬姟绔欑偣鍦板潃
         /// <summary>
         /// 鐧婚檰
         /// </summary>
         public static string Login()
         {
+            var dbId = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DbId");
+            var useName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "UserName");
+            var pwd = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "PassWord");
             HttpClient httpClient = new HttpClient();
             httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc");
-
-            //var loginResult = client.ValidateLogin("61b14ea86f5c8a", "Administrator", "sharbo@2012", 2052); 澶忓疂澶囦唤娴嬭瘯璐﹀
-            //var loginResult = client.ValidateLogin("61a5bea53ffc61", "Administrator", "1234.com", 2052);澶忓疂姝e紡璐﹀
             List<object> Parameters = new List<object>();
-            Parameters.Add("61a5bea53ffc61");//璐﹀鏍囩ず
-            Parameters.Add("Administrator");//鐢ㄦ埛鍚�
-            Parameters.Add("1234.com");//瀵嗙爜
+            Parameters.Add(dbId);//璐﹀鏍囩ず
+            Parameters.Add(useName);//鐢ㄦ埛鍚�
+            Parameters.Add(pwd);//瀵嗙爜
             Parameters.Add(2052);//2052浠h〃涓枃
             httpClient.Content = JsonConvert.SerializeObject(Parameters);
 

--
Gitblit v1.9.1