Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightAggregationTerminal
This commit is contained in:
commit
2334555c7b
13 files changed
+206
-41
No files matched your search
+12
-8
@@ -22,7 +22,14 @@ namespace SunlightAggregationTerminal.Class
|
||||
DataReceived.ServerPassword = Password;
|
||||
DataReceived.ServerTerminal = Terminal;
|
||||
|
||||
await HttpClient(DataReceived.ServerIP);
|
||||
if (string.IsNullOrWhiteSpace(ip))
|
||||
{
|
||||
App.GlobalData.LogNo = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
await HttpClient(DataReceived.ServerIP);
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task HttpClient(string url)
|
||||
@@ -52,13 +59,13 @@ namespace SunlightAggregationTerminal.Class
|
||||
await e.InvokeNext();
|
||||
});
|
||||
});
|
||||
config.ConfigurePlugins(a =>
|
||||
/*config.ConfigurePlugins(a =>
|
||||
{
|
||||
a.UseReconnection<TouchSocket.Http.HttpClient>(options =>
|
||||
{
|
||||
options.PollingInterval = TimeSpan.FromSeconds(3);
|
||||
});
|
||||
});
|
||||
});*/
|
||||
#endregion
|
||||
|
||||
//配置config
|
||||
@@ -79,14 +86,11 @@ namespace SunlightAggregationTerminal.Class
|
||||
Dat = Dat
|
||||
};
|
||||
|
||||
var t = JsonSerializer.Serialize(dat);
|
||||
var p = httpclient.RemoteIPHost.Host;
|
||||
|
||||
var request = new HttpRequest();
|
||||
request.SetContent(new StringHttpContent(t, Encoding.UTF8, "application/scjson"))
|
||||
request.SetContent(new StringHttpContent(JsonSerializer.Serialize(dat), Encoding.UTF8, "application/scjson"))
|
||||
.InitHeaders()
|
||||
.SetUrl("/api/user-report")
|
||||
.SetHost(p)
|
||||
.SetHost(httpclient.RemoteIPHost.Host)
|
||||
.AsPost();
|
||||
|
||||
// 创建一个超时操作,10秒后取消
|
||||
|
||||
Reference in new issue
Block a user