Commit 5d32bcf1 by BruceLu

token不會過期,註解掉程式碼

parent 3c42a62b
......@@ -57,7 +57,8 @@ internal class Program
{
JObject jObject = new JObject();
jObject["username"] = _username = username;
jObject["password"] = _password = password.ToMD5(username);
_password = password;
jObject["password"] = password.ToMD5(username);
jObject["refer"] = "https://ams.cali9999.net/";
var res = _httpClient.PostAsync($"https://ams.cali9999.net/service/auth?t={DateTime.Now.Millisecond}", new StringContent(JsonConvert.SerializeObject(jObject), Encoding.UTF8, "application/json")).Result;
if (res.IsSuccessStatusCode)
......@@ -107,12 +108,12 @@ internal class Program
{
var totalContent = JsonConvert.DeserializeObject<JObject>(res.Content.ReadAsStringAsync().Result);
//判斷token有沒有過期
if (totalContent["resultCode"] is not null && (int)totalContent["resultCode"] != 0)
/*if (totalContent["resultCode"] is not null && (int)totalContent["resultCode"] != 0)
{
Login(_username, _password);
GetWinLoss(startTime, endTime, pageNum, numPerPage);
return;
}
}*/
var info = totalContent["data"]["total"].ToObject<WinLossSummary>();
if (info != null)
......@@ -127,12 +128,12 @@ internal class Program
{
var agentContent = JsonConvert.DeserializeObject<JObject>(res.Content.ReadAsStringAsync().Result);
//判斷token有沒有過期
if (agentContent["resultCode"] is not null && (int)agentContent["resultCode"] != 0)
/*if (agentContent["resultCode"] is not null && (int)agentContent["resultCode"] != 0)
{
Login(_username, _password);
GetWinLoss(startTime, endTime, pageNum, numPerPage);
return;
}
}*/
if (agentContent["data"]["agentDetails"]["groups"] != null)
{
foreach (var item in agentContent["data"]["agentDetails"]["groups"])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment