using Newtonsoft.Json.Linq;
|
using XhOA.Constants;
|
using System;
|
using Kingdee.BOS.WebApi.Client;
|
|
namespace XhOA.Untity
|
{
|
public class CloudClient : K3CloudApiClient
|
{
|
#if DEBUG
|
public const string DbId = " ";//MDM
|
#else
|
public const string DbId = "5ce8f62da69d38";
|
#endif
|
public const string UserName = "Administrator";
|
public const string PassWord = "888888";
|
public CloudClient(string serverUrl = Url.KDApiUrl) : base(serverUrl)
|
{
|
var loginResult = ValidateLogin(DbId, UserName, PassWord, 2052);
|
var resultType = JObject.Parse(loginResult)["LoginResultType"].Value<int>();
|
//登录结果类型等于1,代表登录成功
|
if (resultType != 1)
|
{
|
throw new Exception("登录失败!");
|
}
|
}
|
}
|
}
|