|
|
@ -11,6 +11,7 @@ using Newtonsoft.Json; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using SkiaSharp; |
|
|
|
using SkiaSharp; |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
|
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Globalization; |
|
|
|
using System.Globalization; |
|
|
@ -163,6 +164,10 @@ namespace AKS.EnterpriseLibrary.WebBrowser |
|
|
|
case "aks100117": |
|
|
|
case "aks100117": |
|
|
|
result = ReadQuestionAnswer(content); |
|
|
|
result = ReadQuestionAnswer(content); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
//读取问答:{ "code":"aks100118", "isCloseHttp":true,"data": "{}"} |
|
|
|
|
|
|
|
case "aks100118": |
|
|
|
|
|
|
|
result = SendSQ(content); |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"无效指令\"}"; |
|
|
|
result = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"无效指令\"}"; |
|
|
|
break; |
|
|
|
break; |
|
|
@ -1232,7 +1237,8 @@ namespace AKS.EnterpriseLibrary.WebBrowser |
|
|
|
{ |
|
|
|
{ |
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "获取数据失败" + "\"}"; |
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "获取数据失败" + "\"}"; |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"" + qwStr + "\"}"; |
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"" + qwStr + "\"}"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1244,6 +1250,56 @@ namespace AKS.EnterpriseLibrary.WebBrowser |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// 获取授权数据 |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="command"></param> |
|
|
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
|
|
|
public static string SendSQ(string content) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var param = content.ConvertToAnonymousType(new |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
code = default(string), |
|
|
|
|
|
|
|
data = default(string), |
|
|
|
|
|
|
|
isCloseHttp = default(bool) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if (param == null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "参数解析错误" + "\"}"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Parame.isCloseHttp = param.isCloseHttp; |
|
|
|
|
|
|
|
List<Func> list = new List<Func>(); |
|
|
|
|
|
|
|
JObject jo = (JObject)JsonConvert.DeserializeObject(param.data); |
|
|
|
|
|
|
|
if (jo["IsSucceed"].ToString() == "True") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
string result = jo["result"].ToString(); |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty("result")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
JArray array = (JArray)JsonConvert.DeserializeObject(result); |
|
|
|
|
|
|
|
foreach (JObject item in array) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Func func = new Func() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Id = item["Id"].ToString(), |
|
|
|
|
|
|
|
Platform = item["Platform"].ToString(), |
|
|
|
|
|
|
|
Interfaceaddress = item["Interfaceaddress"].ToString(), |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
list.Add(func); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Parame.FuncObject = list; |
|
|
|
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + param.code + "\",\"message\":\"seccse\",\"code\":\"200\",\"status\":true,\"data\":\"" + "推送成功" + "\"}"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//Log.Error("执行文件异常:" + ex.Message); |
|
|
|
|
|
|
|
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "" + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + ex.Message + "\"}"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// 执行文件 |
|
|
|
/// 执行文件 |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|