|
@@ -25,7 +25,7 @@ namespace wispro.sp.web.Components
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
[Inject]
|
|
- protected HttpClient _httpClient{get;set;}
|
|
|
|
|
|
+ protected IHttpService _httpClient{get;set;}
|
|
|
|
|
|
#region 文件上传控件设定
|
|
#region 文件上传控件设定
|
|
//List<UploadFileItem> fileList = new List<UploadFileItem>();
|
|
//List<UploadFileItem> fileList = new List<UploadFileItem>();
|
|
@@ -44,7 +44,7 @@ namespace wispro.sp.web.Components
|
|
_Model.FileList.Where(file => file.State == UploadState.Success && !string.IsNullOrWhiteSpace(file.Response)).ForEach(file =>
|
|
_Model.FileList.Where(file => file.State == UploadState.Success && !string.IsNullOrWhiteSpace(file.Response)).ForEach(file =>
|
|
{
|
|
{
|
|
var result = file.GetResponse<List<AttachFile>>();
|
|
var result = file.GetResponse<List<AttachFile>>();
|
|
- file.Url = $"http://localhost:39476/api/AttachFiles/Download?id={result[0].Id}";
|
|
|
|
|
|
+ file.Url = $"AttachFiles/Download?id={result[0].Id}";
|
|
});
|
|
});
|
|
}
|
|
}
|
|
catch { }
|
|
catch { }
|
|
@@ -55,7 +55,7 @@ namespace wispro.sp.web.Components
|
|
try
|
|
try
|
|
{
|
|
{
|
|
var result = fileinfo.GetResponse<List<AttachFile>>();
|
|
var result = fileinfo.GetResponse<List<AttachFile>>();
|
|
- return await _httpClient.GetFromJsonAsync<bool>($"http://localhost:39476/api/AttachFiles/Delete?id={result[0].Id}");
|
|
|
|
|
|
+ return await _httpClient.Get<bool>($"http://localhost:39476/api/AttachFiles/Delete?id={result[0].Id}");
|
|
}
|
|
}
|
|
catch {
|
|
catch {
|
|
return false;
|
|
return false;
|