Authored by 张帅

笔记和短视频增加标题

... ... @@ -166,6 +166,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
article.setArticleSubtitle(req.getSubtitle());
article.setSort(sort);
article.setCopyright(req.getCopyright());
article.setArticleTitle(req.getTitle());
try {
grassArticleDao.insertArticleSeletive(article);
logger.info("insert grass article success, uid is {}, ariticle id is {}", article.getAuthorUid(), article.getId());
... ... @@ -590,6 +591,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
grassArticle.setArticleSubtitle(req.getSubtitle());
grassArticle.setSort(sort);
grassArticle.setCopyright(req.getCopyright());
grassArticle.setArticleTitle(req.getTitle());
grassArticleDao.updateByPrimaryKeySelective(grassArticle);
//文章内容
... ... @@ -1155,6 +1157,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
article.setArticleSubtitle(req.getSubtitle());
article.setSort(sort);
article.setCopyright(req.getCopyright());
article.setArticleTitle(req.getTitle());
try {
grassArticleDao.insertArticleSeletive(article);
logger.info("insert grass article success, uid is {}, ariticle id is {}", article.getAuthorUid(), article.getId());
... ... @@ -1276,7 +1279,6 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
rspBo.setSourceStr(ArticleTypeEnum.getNameByValue(grassArticle.getArticleType()));
rspBo.setArticleTitle(grassArticle.getArticleTitle());
rspBo.setArticleSubtitle(grassArticle.getArticleSubtitle());
rspBo.setArticleSubtitle(grassArticle.getArticleSubtitle());
rspBo.setCopyright(grassArticle.getCopyright());
//是否已发布 Y 已经发布 N 还没发布 //只有authtime =1 的时候 字段才有效
String isPublished = grassArticle.getCreateTime() >= System.currentTimeMillis() ? "N" : "Y";
... ...
... ... @@ -63,6 +63,18 @@
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<label style="font-size: 14px;">标题</label> <br>
<div style="width:600px; word-wrap:break-word;float: left;position: relative" >
<input id="title" name="title" style="width:600px " class="easyui-textbox" />
</div>
<!--<div style="clear: both;"> <span id="content-count">0</span>/500</div>-->
</td>
</tr>
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label style="font-size: 14px;">文字内容(必填项,内容不能为空)</label> <br>
<div style="width:600px; word-wrap:break-word;float: left;position: relative" >
... ... @@ -194,6 +206,16 @@
});
$("#title").textbox({
required: true,
missingMessage: "请输入80字以内的标题",
prompt: "请输入80字以内的标题",
validType:"length[1,80]",
onChange: function () {
}
});
$("#addImage").linkbutton({
iconCls : "icon-search",
onClick : function() {
... ... @@ -678,6 +700,7 @@
$("#articleUid").textbox("setValue", data.authorUid);
$("#draftArticleId").val(data.articleId);
$("#title").textbox("setValue",data.articleTitle);
// $("#content").val(data.articleContent);
$("#content").emojioneArea()[0].emojioneArea.setText(data.articleContent);
... ...
... ... @@ -63,6 +63,18 @@
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<label style="font-size: 14px;">标题</label> <br>
<div style="width:600px; word-wrap:break-word;float: left;position: relative" >
<input id="title" name="title" style="width:600px " class="easyui-textbox" />
</div>
<!--<div style="clear: both;"> <span id="content-count">0</span>/500</div>-->
</td>
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<span style="color:red">*</span><label style="font-size: 14px;">文字内容(必填项,内容不能为空)</label> <br>
<div style="width:600px; word-wrap:break-word;float: left;position: relative" >
... ... @@ -203,6 +215,14 @@
});
$("#title").textbox({
required: true,
missingMessage: "请输入80字以内的标题",
prompt: "请输入80字以内的标题",
validType:"length[1,80]",
onChange: function () {
}
});
$("#addImage").linkbutton({
iconCls : "icon-search",
... ... @@ -576,7 +596,7 @@
if (data){
$("#articleUid").textbox("setValue", data.authorUid);
$("#title").textbox("setValue",data.articleTitle);
// $("#content").val(data.articleContent);
$("#content").emojioneArea()[0].emojioneArea.setText(data.articleContent);
/*字数限制提示*/
... ...
... ... @@ -75,6 +75,18 @@
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<label style="font-size: 14px;">标题</label> <br>
<div style="width:600px; word-wrap:break-word;float: left;position: relative" >
<input id="title" name="title" style="width:600px " class="easyui-textbox" />
</div>
<!--<div style="clear: both;"> <span id="content-count">0</span>/500</div>-->
</td>
</tr>
<tr style="height: 60px">
<td style="width:100%; word-wrap:break-word;" >
<span style="color:red">*</span><label style="font-size: 14px;">文字内容(必填项,内容不能为空)</label> <br>
<div style="width:600px; word-wrap:break-word;float: left;position: relative" >
... ... @@ -174,6 +186,16 @@
var checkType = 1;
$(function () {
$("#title").textbox({
required: true,
missingMessage: "请输入80字以内的标题",
prompt: "请输入80字以内的标题",
validType:"length[1,80]",
onChange: function () {
}
});
$("#content").emojioneArea({
// options
autoHideFilters: true,
... ...
... ... @@ -25,6 +25,9 @@
<br>
内容来源: <span id="sourceStr"></span>
<br>
<br>
标题: <span id="title"></span>
<br>
<div style="color: red; font-size: 14px">
<span style="color: black;font-size: 12px">内容统计:</span> 文字-<span id="contentLength"></span>&nbsp;&nbsp;&nbsp; 图片-<span
id="imgSize"></span>&nbsp;&nbsp;&nbsp;关联商品-<span id="productSize"></span>
... ... @@ -199,6 +202,7 @@
$("#authorUid").html(detailInfo.authorUid);
$("#nickName").html(detailInfo.nickName);
$("#sourceStr").html(detailInfo.sourceStr);
$("#title").html(detailInfo.articleTitle);
$("#contentLength").html(detailInfo.articleContent == null ? 0 : detailInfo.articleContent.length);
$("#articleContent").html(detailInfo.articleContent == null || detailInfo.articleContent.length == 0 ? "文字内容:空<br>" : "文字内容:<br>" + detailInfo.articleContent);
... ...