提交补
parent
e212d76822
commit
a6c37463c5
|
|
@ -1,8 +1,10 @@
|
||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using OpenAuth.App.BaseApp.Base;
|
||||||
using OpenAuth.App.ServiceApp.GoView;
|
using OpenAuth.App.ServiceApp.GoView;
|
||||||
using OpenAuth.App.ServiceApp.GoView.Request;
|
using OpenAuth.App.ServiceApp.GoView.Request;
|
||||||
using OpenAuth.App.ServiceApp.GoView.Response;
|
using OpenAuth.App.ServiceApp.GoView.Response;
|
||||||
|
using OpenAuth.Repository.Domain;
|
||||||
using OpenAuth.Repository.Domain.GoView;
|
using OpenAuth.Repository.Domain.GoView;
|
||||||
|
|
||||||
namespace OpenAuth.WebApi.Controllers.ServiceControllers.GoView;
|
namespace OpenAuth.WebApi.Controllers.ServiceControllers.GoView;
|
||||||
|
|
@ -153,4 +155,54 @@ public class GoViewProjectController : ControllerBase
|
||||||
return await _app.DeleteComponent(ids);
|
return await _app.DeleteComponent(ids);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
/// <summary>
|
||||||
|
/// 图片上传接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="files"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("image/upload")]
|
||||||
|
[RequestSizeLimit(214748364800)]
|
||||||
|
public Response<IList<SysUploadFile>> UploadImage(IFormFileCollection files)
|
||||||
|
{
|
||||||
|
var result = new Response<IList<SysUploadFile>>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result.Result = _app.Add(files);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
result.Code = 500;
|
||||||
|
result.Message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取组件图片
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="req"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("image/list")]
|
||||||
|
public Response<IList<SysUploadFile>> GetImage([FromQuery] PageReq req )
|
||||||
|
{
|
||||||
|
|
||||||
|
return new Response<IList<SysUploadFile>>()
|
||||||
|
{
|
||||||
|
Result = _app.GetImage(req)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 删除图片
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("image/delete")]
|
||||||
|
public Response<bool> DeleteImage(string ids)
|
||||||
|
{
|
||||||
|
return new Response<bool>()
|
||||||
|
{
|
||||||
|
Result = _app.DeleteImage(ids)
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue