This commit is contained in:
lxyer 2018-06-17 10:36:24 +08:00
parent 4d2f63555b
commit 05bcd44e97
9 changed files with 117 additions and 8 deletions

View File

@ -5,6 +5,9 @@
<!-- 详细配置说明见: http://redkale.org/redkale.html#redkale_confxml --> <!-- 详细配置说明见: http://redkale.org/redkale.html#redkale_confxml -->
<resources> <resources>
<source name="redis" value="org.redkalex.cache.RedisCacheSource" xxx="16">
<node addr="redishost" port="6379"/>
</source>
</resources> </resources>
<server protocol="HTTP" host="0.0.0.0" port="6060" root="root"> <server protocol="HTTP" host="0.0.0.0" port="6060" root="root">

View File

Binary file not shown.

Binary file not shown.

View File

96
root/article/index.html Normal file
View File

@ -0,0 +1,96 @@
<!--文章博客首页-->
<!--- Created by JUECHENG at 2018/4/5 20:55. --->
#@layout()
#define css()
<style>
.fly-panel{margin-right: 15px}
</style>
#end
#define main()
<div class="layui-container">
<div class="layui-row">
<div class="layui-col-md9" style="padding-top: 20px;">
<div class="layui-col-md4">
<div class="fly-panel" style="padding: 10px">
<h2>这里是一个标题</h2>
<div>
这里是内容摘要,这里是内容摘要,这里是内容摘要,这里是内容摘要,
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="fly-panel" style="padding: 10px">
<h2>这里是一个标题</h2>
<div>
这里是内容摘要,这里是内容摘要,这里是内容摘要,这里是内容摘要,
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="fly-panel" style="padding: 10px">
<h2>这里是一个标题</h2>
<div>
这里是内容摘要,这里是内容摘要,这里是内容摘要,这里是内容摘要,
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="fly-panel" style="padding: 10px">
<h2>这里是一个标题</h2>
<div>
这里是内容摘要,这里是内容摘要,这里是内容摘要,这里是内容摘要,
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="fly-panel" style="padding: 10px">
<h2>这里是一个标题</h2>
<div>
这里是内容摘要,这里是内容摘要,这里是内容摘要,这里是内容摘要,
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="fly-panel" style="padding: 10px">
<h2>这里是一个标题</h2>
<div>
这里是内容摘要,这里是内容摘要,这里是内容摘要,这里是内容摘要,
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="fly-panel" style="padding: 10px">
<h2>这里是一个标题</h2>
<div>
这里是内容摘要,这里是内容摘要,这里是内容摘要,这里是内容摘要,
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="fly-panel" style="padding: 10px">
<h2>这里是一个标题</h2>
<div>
这里是内容摘要,这里是内容摘要,这里是内容摘要,这里是内容摘要,
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="fly-panel" style="padding: 10px">
<h2>这里是一个标题这里是一个标题这里是一个标题</h2>
<div>
这里是内容摘要,这里是内容摘要,这里是内容摘要,这里是内容摘要,
</div>
</div>
</div>
</div>
<div class="layui-col-md3">
你的内容 3/12
</div>
</div>
</div>
#end

View File

@ -562,3 +562,4 @@ body .fly-user-main{position: relative; min-height: 600px;}
} }
.layui-form-select dl{z-index: 10002;} .layui-form-select dl{z-index: 10002;}
.at_user{color: #1e9fff;}

View File

@ -156,12 +156,14 @@ layui.define(['fly','laypage'], function(exports){
}); });
} }
,reply: function(li){ //回复 ,reply: function(li){ //回复
var val = dom.content.val(); //var val = dom.content.val();
var aite = '@'+ li.find('.fly-detail-user cite').text().replace(/\s/g, ''); var aite = '@'+ li.find('.fly-detail-user cite').text().replace(/\s/g, '') + '&nbsp;';
dom.content.focus() //dom.content.focus()
if(val.indexOf(aite) !== -1) return; //if(val.indexOf(aite) !== -1) return;
dom.content.val(aite +' ' + val); //dom.content.val(aite +' ' + val);
$("input[name='pid']").val(li.data('id')); $("input[name='pid']").val(li.data('id'));
editor.cmd.do('insertHTML', "<p class='at_user'>"+aite+"</p>");
//editor.txt.append();
} }
,accept: function(li){ //采纳 ,accept: function(li){ //采纳
var othis = $(this); var othis = $(this);

View File

@ -36,13 +36,20 @@ public class CommentService extends BaseService<Comment, CommentInfo> {
public RetResult commentSave(@RestSessionid String sessionid, @RestParam(name = "bean") Comment comment){ public RetResult commentSave(@RestSessionid String sessionid, @RestParam(name = "bean") Comment comment){
int contentId = comment.getContentId(); int contentId = comment.getContentId();
if (contentId < 1) return RetCodes.retResult(RET_COMMENT_PARA_ILLEGAL, "评论参数无效"); //数据校验
if (comment.getContent() == null) return RetCodes.retResult(RET_COMMENT_CONTENT_ILLEGAL, "评论内容无效"); if (contentId < 1)
return RetCodes.retResult(RET_COMMENT_PARA_ILLEGAL, "评论参数无效");
if (comment.getContent() == null)
return RetCodes.retResult(RET_COMMENT_CONTENT_ILLEGAL, "评论内容无效");
String content = LxyKit.delHTMLTag(comment.getContent());
if (content.isEmpty())
return RetCodes.retResult(RET_COMMENT_CONTENT_ILLEGAL, "评论内容无效");
if (comment.getCommentId() < 1) { if (comment.getCommentId() < 1) {
int userId = userService.currentUserId(sessionid); int userId = userService.currentUserId(sessionid);
comment.setUserId(userId); comment.setUserId(userId);
comment.setCreateTime(System.currentTimeMillis()); comment.setCreateTime(System.currentTimeMillis());
//todo:@用户处理
source.insert(comment); source.insert(comment);
//update replyNum //update replyNum