fix: images bug

master
Tongg 8 months ago
parent aa54652617
commit eebbe56306
  1. 9
      Model/Services/SOCClientService.cs

@ -255,6 +255,11 @@ namespace SparkClient.Model.Services
int imageTotal = ConfigurationHelper.ReadConfigValueToInteger("DetectImageTotal", 100);
while (true)
{
if (imageIndex >= imageTotal)
{
return imageNames;
}
string url = $"{_baseUrl}/retrieve_image/{imageIndex}";
string sendCode = url.GenerateSign();
try
@ -290,7 +295,7 @@ namespace SparkClient.Model.Services
case 404:
// 资源未找到,结束循环
Logger.Info($"[SendCode={sendCode}] Image Not Found]");
Logger.Info($"[SendCode={sendCode}] Image Not Found.");
break;
//return imageNames;
default:
@ -425,7 +430,7 @@ namespace SparkClient.Model.Services
// 图片文件读取失败
return new SocResultEntity { Status = StatusCodes.ImageFileReadFailure, Images = new List<string>() };
}
return new SocResultEntity { Status = acquisitionStatus, Images = imageNames, DeviceId = entity.Content.device_id};
return new SocResultEntity { Status = "S000", Images = imageNames, DeviceId = entity.Content.device_id};
}
catch (Exception e)
{

Loading…
Cancel
Save