From dd7db9810d7ef562e3fafee19f5e38a7fde2a5df Mon Sep 17 00:00:00 2001 From: jianweie code Date: Thu, 16 May 2024 10:15:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=96=87=E7=AB=A0=E5=90=8E=E5=8F=B0=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E7=BC=A9=E7=95=A5=E5=9B=BE=E9=99=90=E5=88=B6=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=95=B0=E6=8D=AE=E5=87=BA=E5=8F=A3=E5=8F=8A=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=B1=95=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Uni-App/CoreShop/pages/article/list/list.vue | 2 +- .../wwwroot/views/content/article/articles/create.html | 4 ++-- .../wwwroot/views/content/article/articles/edit.html | 4 ++-- CoreCms.Net.Web.WebApi/Controllers/ArticleController.cs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/article/list/list.vue b/CoreCms.Net.Uni-App/CoreShop/pages/article/list/list.vue index abc3896d..b3d30d8f 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/article/list/list.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/article/list/list.vue @@ -18,7 +18,7 @@ - + {{item.title}} diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/content/article/articles/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/content/article/articles/create.html index 227adbfd..b9cfd578 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/content/article/articles/create.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/content/article/articles/create.html @@ -36,7 +36,7 @@
- +
@@ -63,7 +63,7 @@
- +
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/content/article/articles/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/content/article/articles/edit.html index 5c2f9638..615d773a 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/content/article/articles/edit.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/content/article/articles/edit.html @@ -37,7 +37,7 @@
- +
@@ -115,7 +115,7 @@ } }); editor.setData(d.data.model.contentBody); - + //封面图图片上传 $('#upBtncoverImage').click(function () { cropperImg.cropImg({ diff --git a/CoreCms.Net.Web.WebApi/Controllers/ArticleController.cs b/CoreCms.Net.Web.WebApi/Controllers/ArticleController.cs index a2764630..e385f990 100644 --- a/CoreCms.Net.Web.WebApi/Controllers/ArticleController.cs +++ b/CoreCms.Net.Web.WebApi/Controllers/ArticleController.cs @@ -114,12 +114,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers var where = PredicateBuilder.True(); if (entity.id > 0) { - where = where.And(p => p.isDel == false && p.typeId == entity.id); + where = where.And(p => p.isDel == false && p.typeId == entity.id && p.isPub == true); } else { var typeId = articleType.FirstOrDefault()!.id; - where = where.And(p => p.isDel == false && p.typeId == typeId); + where = where.And(p => p.isDel == false && p.typeId == typeId && p.isPub == true); } var list = await _articleServices.QueryPageAsync(where, p => p.createTime, OrderByType.Desc, entity.page, entity.limit); jm.data = new @@ -168,7 +168,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers jm.data = model; return jm; - } + } #endregion } }