Browse Source

修改打卡提示

黑龙江艺术高中职
dao 1 month ago
parent
commit
cd44fe624b
2 changed files with 10 additions and 1 deletions
  1. +9
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AttendanceApi.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Web/HttpMethods.cs

+ 9
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AttendanceApi.cs View File

@@ -130,8 +130,16 @@ namespace Learun.Application.WebApi.Modules
string imgid = parameter.Img;

var url = Config.GetValue("FaceCheckApi");
try
{

result = Util.HttpMethods.HttpGet($"{url}{userimg}/{imgid}");
result = Util.HttpMethods.HttpGet($"{url}{userimg}/{imgid}");
}
catch (Exception e)
{

return Fail($"照片验证超时!{e.Message}");
}
}
if (result == "1")
{


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Web/HttpMethods.cs View File

@@ -110,6 +110,7 @@ namespace Learun.Util
public static string HttpGet(string url)
{
WebRequest myWebRequest = WebRequest.Create(url);
myWebRequest.Timeout = 20000;
WebResponse myWebResponse = myWebRequest.GetResponse();
Stream ReceiveStream = myWebResponse.GetResponseStream();
string responseStr = "";


Loading…
Cancel
Save