diff --git a/src/CoreCms.Net.Web.WebApi/Controllers/NoticeController.cs b/src/CoreCms.Net.Web.WebApi/Controllers/NoticeController.cs
index b33dbcb..07690af 100644
--- a/src/CoreCms.Net.Web.WebApi/Controllers/NoticeController.cs
+++ b/src/CoreCms.Net.Web.WebApi/Controllers/NoticeController.cs
@@ -13,14 +13,17 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
+
using CoreCms.Net.Auth.HttpContextUser;
using CoreCms.Net.Configuration;
using CoreCms.Net.IServices;
using CoreCms.Net.Model.FromBody;
using CoreCms.Net.Model.ViewModels.UI;
+
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+
using SqlSugar;
namespace CoreCms.Net.Web.WebApi.Controllers
@@ -73,14 +76,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
/// 获取单个公告内容
///
- ///
+ ///
///
- [HttpPost]
- public async Task NoticeInfo([FromBody] FMIntId entity)
+ [HttpGet]
+ public async Task NoticeInfo([FromQuery] int id)
{
+ if (id == 0)
+ {
+ throw new ArgumentNullException("id");
+ }
var jm = new WebApiCallBack();
- var model = await _noticeServices.QueryByIdAsync(entity.id);
+ var model = await _noticeServices.QueryByIdAsync(id);
if (model == null)
{
jm.msg = "数据获取失败";
diff --git a/src/CoreCms.Net.Web.WebApi/Doc.xml b/src/CoreCms.Net.Web.WebApi/Doc.xml
index 4db94f9..70c8a95 100644
--- a/src/CoreCms.Net.Web.WebApi/Doc.xml
+++ b/src/CoreCms.Net.Web.WebApi/Doc.xml
@@ -463,7 +463,7 @@
-
+
获取单个公告内容