描述
This commit is contained in:
parent
95f3e785fe
commit
3d71f4af0c
@ -45,6 +45,10 @@ public class CMSCategoryAPI extends BaseController {
|
||||
*/
|
||||
@PostMapping("/contentList")
|
||||
public AjaxResult contentList(@RequestBody CmsContentQuery contentQuery){
|
||||
|
||||
|
||||
|
||||
|
||||
if (contentQuery.getCategoryId() == null) return success();
|
||||
return success(categoryService.contentList(contentQuery));
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ public class CmsContent extends BaseEntity
|
||||
/** 内容类型(0=文章,1=图片,2=视频) */
|
||||
@Excel(name = "内容类型(0=文章,1=图片,2=视频)")
|
||||
private String contentType;
|
||||
private Integer sortNum;
|
||||
|
||||
/** 标题 */
|
||||
@Excel(name = "标题")
|
||||
|
@ -15,6 +15,7 @@
|
||||
<result property="sourceUrl" column="source_url"/>
|
||||
<result property="original" column="original"/>
|
||||
<result property="author" column="author"/>
|
||||
<result property="sortNum" column="sort_num"/>
|
||||
<result property="editor" column="editor"/>
|
||||
<result property="summary" column="summary"/>
|
||||
<result property="tagName" column="tag_name"/>
|
||||
@ -52,6 +53,7 @@
|
||||
source_url,
|
||||
original,
|
||||
author,
|
||||
sort_num,
|
||||
editor,
|
||||
summary,
|
||||
tag_name,
|
||||
@ -85,6 +87,7 @@
|
||||
source_url,
|
||||
original,
|
||||
author,
|
||||
sort_num,
|
||||
editor,
|
||||
summary,
|
||||
tag_name,
|
||||
@ -124,7 +127,7 @@
|
||||
<if test="accessoryUrl != null and accessoryUrl != ''">and accessory_url = #{accessoryUrl}</if>
|
||||
<if test="delFlag != null">and del_flag = #{delFlag}</if>
|
||||
</where>
|
||||
order by create_time desc, update_time desc
|
||||
order by sort_num ASC, create_time desc, update_time desc
|
||||
</select>
|
||||
|
||||
<select id="contentList" parameterType="CmsContent" resultMap="CmsContentResult">
|
||||
@ -139,6 +142,7 @@
|
||||
source_url,
|
||||
original,
|
||||
author,
|
||||
sort_num,
|
||||
editor,
|
||||
summary,
|
||||
tag_name,
|
||||
@ -178,7 +182,7 @@
|
||||
<if test="accessoryUrl != null and accessoryUrl != ''">and accessory_url = #{accessoryUrl}</if>
|
||||
<if test="delFlag != null">and del_flag = #{delFlag}</if>
|
||||
</where>
|
||||
order by create_time desc, update_time desc
|
||||
order by sort_num ASC, create_time desc, update_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCmsContentById" parameterType="Long" resultMap="CmsContentResult">
|
||||
@ -199,6 +203,7 @@
|
||||
tag_name,
|
||||
original,
|
||||
author,
|
||||
sort_num,
|
||||
editor,
|
||||
summary,
|
||||
status,
|
||||
@ -239,7 +244,7 @@
|
||||
<if test="accessoryUrl != null and accessoryUrl != ''">and accessory_url = #{accessoryUrl}</if>
|
||||
<if test="delFlag != null">and del_flag = #{delFlag}</if>
|
||||
</where>
|
||||
order by create_time desc, update_time desc
|
||||
order by sort_num ASC, create_time desc, update_time desc
|
||||
</select>
|
||||
|
||||
<insert id="insertCmsContent" parameterType="CmsContent">
|
||||
@ -255,6 +260,7 @@
|
||||
<if test="sourceUrl != null and sourceUrl != ''">source_url,</if>
|
||||
<if test="original != null and original != ''">original,</if>
|
||||
<if test="author != null and author != ''">author,</if>
|
||||
<if test="sortNum != null and sortNum != ''">sort_num,</if>
|
||||
<if test="editor != null and editor != ''">editor,</if>
|
||||
<if test="tagName != null and tagName != ''">tag_name,</if>
|
||||
<if test="summary != null and summary != ''">summary,</if>
|
||||
@ -285,6 +291,7 @@
|
||||
<if test="sourceUrl != null and sourceUrl != ''">#{sourceUrl},</if>
|
||||
<if test="original != null and original != ''">#{original},</if>
|
||||
<if test="author != null and author != ''">#{author},</if>
|
||||
<if test="sortNum != null and sortNum != ''">#{sortNum},</if>
|
||||
<if test="editor != null and editor != ''">#{editor},</if>
|
||||
<if test="tagName != null and tagName != ''">#{tagName},</if>
|
||||
<if test="summary != null and summary != ''">#{summary},</if>
|
||||
@ -326,6 +333,7 @@
|
||||
author = #{author},
|
||||
tag_name = #{tagName},
|
||||
editor = #{editor},
|
||||
sort_num = #{sortNum},
|
||||
summary = #{summary},
|
||||
status = #{status},
|
||||
publish_date = #{publishDate},
|
||||
|
@ -211,6 +211,9 @@ export default {
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
mounted() {
|
||||
this.handleQuery()
|
||||
},
|
||||
methods: {
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-col :span="24">
|
||||
<div style="margin-bottom: 5px" class="grid-btn-bar bg-purple-white">
|
||||
<el-button plain type="success" size="mini" icon="el-icon-edit" @click="handlerSaveBefore">保存</el-button>
|
||||
<el-button plain type="primary" size="mini" icon="el-icon-s-promotion" @click="handlePublish">发布</el-button>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -33,6 +33,15 @@
|
||||
show-word-limit>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否置顶" prop="contentTitle">
|
||||
<el-switch
|
||||
v-model="form.sortNum"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="封面图" prop="contentImg">
|
||||
<image-upload :limit="1" v-model="form.contentImg"></image-upload>
|
||||
</el-form-item>
|
||||
|
@ -120,7 +120,7 @@
|
||||
<div class="news11-list">
|
||||
<div class="news11-list-item" v-for="(item, index) in this.xlist" :key="index" @click="goDeatails(item)">
|
||||
<div class="img">
|
||||
<div class="yl-right" > {{getDictLabel(item.imitationType)}} </div>
|
||||
<div class="yl-right" v-if="getDictLabel(item.imitationType)" > {{getDictLabel(item.imitationType)}} </div>
|
||||
<img :src="item.imitationImage" class="imgWO" style="width: 100%; height: 100% ">
|
||||
</div>
|
||||
<div class="tt">
|
||||
|
@ -296,9 +296,19 @@
|
||||
</div>
|
||||
|
||||
<div v-show="currentActive == 2 " class="wrapbox">
|
||||
<div class="noticeRsr" v-for="(item,index) in noticeList" @click="goDeatail(item)" >
|
||||
<div >{{item.contentTitle}}</div>
|
||||
<div >{{item.publishDate}}</div>
|
||||
<!-- <div class="noticeRsr" v-for="(item,index) in noticeList" @click="goDeatail(item)" >-->
|
||||
<!-- <div >{{item.contentTitle}}</div>-->
|
||||
<!-- <div >{{item.publishDate}}</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="n-box" v-for="(item,index) in noticeList" @click="goDeatail(item)" >
|
||||
<div>
|
||||
<div class="v-time" >{{item.publishDate}}</div>
|
||||
<div class="v-title">{{item.contentTitle}}</div>
|
||||
<div class="v-size">{{item.summary || '' }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<img :src=" imgurl + item.contentImg" style="width: 300px; height: 150px; ">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="currentActive == 2 || currentActive == 4 || currentActive === 3" >
|
||||
@ -1102,4 +1112,35 @@ export default {
|
||||
color: #00A0E8;
|
||||
cursor: pointer;
|
||||
}
|
||||
.n-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 0px;
|
||||
background: #fff;
|
||||
}
|
||||
.noticeRsr:hover{
|
||||
color: #00A0E8;
|
||||
cursor: pointer;
|
||||
}
|
||||
.v-time{
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
color: #005375;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.v-title{
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
color: #005375;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.v-size{
|
||||
width: 800px;
|
||||
font-size: 18px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user