.
This commit is contained in:
parent
4d2f63555b
commit
05bcd44e97
@ -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">
|
||||||
|
Binary file not shown.
BIN
lib/redkale.jar
BIN
lib/redkale.jar
Binary file not shown.
96
root/article/index.html
Normal file
96
root/article/index.html
Normal 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
|
@ -561,4 +561,5 @@ body .fly-user-main{position: relative; min-height: 600px;}
|
|||||||
.site-mobile .site-mobile-shade{content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.9); z-index: 999;}
|
.site-mobile .site-mobile-shade{content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.9); z-index: 999;}
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-form-select dl{z-index: 10002;}
|
.layui-form-select dl{z-index: 10002;}
|
||||||
|
.at_user{color: #1e9fff;}
|
@ -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, '') + ' ';
|
||||||
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);
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user