【优化】取消文章后台发布缩略图限制,优化数据出口及列表展示。

This commit is contained in:
jianweie code
2024-05-16 10:15:31 +08:00
parent ad53da6d99
commit dd7db9810d
4 changed files with 8 additions and 8 deletions

View File

@@ -18,7 +18,7 @@
<view class="coreshop-bg-white coreshop-margin-10">
<view class="coreshop-flex coreshop-solid-bottom coreshop-justify-between coreshop-flex-nowrap coreshop-padding-top-10 coreshop-padding-bottom-10 coreshop-padding-left-10 coreshop-padding-right-10" v-for="item in list" :key="item.id" @click="goArticleDetail(item.id)">
<view class="coreshop-flex coreshop-flex-nowrap">
<u--image width="25px" height="25px" :src="item.coverImage" mode="aspectFill" :showLoading="true"></u--image>
<u--image width="25px" height="25px" :src="item.coverImage? item.coverImage : '/static/images/common/empty.png'" mode="aspectFill" :showLoading="true"></u--image>
<view class="u-line-2 coreshop-padding-left-5 coreshop-font-14">{{item.title}}</view>
</view>
<view class="coreshop-text-gray coreshop-text-right coreshop-justify-end">

View File

@@ -36,7 +36,7 @@
<div class="layui-form-item">
<label for="coverImage" class="layui-form-label">封面图</label>
<div class="layui-input-inline layui-inline-10">
<input name="coverImage" id="coverImage" lay-verType="tips" lay-verify="required" class="layui-input" placeholder="请上传封面图" lay-reqText="请上传封面图" />
<input name="coverImage" id="coverImage" lay-verType="tips" class="layui-input" placeholder="请上传封面图" lay-reqText="请上传封面图" />
</div>
<div class="layui-input-inline">
<img class="coreshop-upload-img" id="viewImgBoxcoverImage" src="{{ layui.setter.noImagePicUrl }}">
@@ -63,7 +63,7 @@
</div>
<label for="isPub" class="layui-form-label">是否发布</label>
<div class="layui-input-inline layui-inline-2">
<input type="checkbox" lay-filter="switch" name="isPub" id="isPub" lay-skin="switch" lay-text="开启|关闭">
<input type="checkbox" lay-filter="switch" name="isPub" id="isPub" lay-skin="switch" lay-text="开启|关闭" checked="checked">
</div>
<label for="isDel" class="layui-form-label">是否删除</label>
<div class="layui-input-inline layui-inline-2">

View File

@@ -37,7 +37,7 @@
<div class="layui-form-item">
<label for="coverImage" class="layui-form-label">封面图</label>
<div class="layui-input-inline layui-inline-10">
<input name="coverImage" id="coverImage" lay-verType="tips" lay-verify="required" class="layui-input" value="{{d.data.model.coverImage || '' }}" placeholder="请上传封面图" lay-reqText="请上传封面图" />
<input name="coverImage" id="coverImage" lay-verType="tips" class="layui-input" value="{{d.data.model.coverImage || '' }}" placeholder="请上传封面图" lay-reqText="请上传封面图" />
</div>
<div class="layui-input-inline">

View File

@@ -114,12 +114,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers
var where = PredicateBuilder.True<CoreCmsArticle>();
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