|
|
@@ -1,4 +1,3 @@
|
|
|
-<!--手机列表页-->
|
|
|
<#if USER??> <#assign userId=USER.id><#else><#assign userId=0></#if>
|
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
@@ -6,6 +5,7 @@
|
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0, user-scalable=no">
|
|
|
<script type="text/javascript" src="${CTPATH}/assets/js/jquery.min.js"></script>
|
|
|
+ <script src="${CPATH}/counter?cid=${content.id!}"></script>
|
|
|
<title></title>
|
|
|
<style>
|
|
|
.main{
|
|
|
@@ -132,6 +132,10 @@
|
|
|
font-size: 14px;
|
|
|
line-height: 70px;
|
|
|
}
|
|
|
+ .main .container .footer .footer-section .img img{
|
|
|
+ max-width: 70px;
|
|
|
+ max-height: 70px;
|
|
|
+ }
|
|
|
.main .container .footer .footer-section .img img.imgUas{
|
|
|
max-width: 70px;
|
|
|
max-height: 70px;
|
|
|
@@ -139,7 +143,6 @@
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
.main .container .footer .footer-section .detail{
|
|
|
- /*overflow: hidden;*/
|
|
|
}
|
|
|
.main .container .footer .footer-section .detail .title{
|
|
|
overflow: hidden;
|
|
|
@@ -241,10 +244,8 @@
|
|
|
color: #fff;
|
|
|
}
|
|
|
</style>
|
|
|
- <!--<#macro script>-->
|
|
|
<script>
|
|
|
</script>
|
|
|
- <!--</#macro>-->
|
|
|
</head>
|
|
|
<body>
|
|
|
<div class="main">
|
|
|
@@ -258,8 +259,7 @@
|
|
|
<div class="readCount">
|
|
|
<div>
|
|
|
<span>阅读 <em>${content.view_count!'0'}</em></span>
|
|
|
- <span><img img class="voteContent <#if content.isvoted(content.id, userId!0, userid!0)>voted</#if>" src="/jpress/static/jpress/admin/image/hands.png" alt="" onclick="voteContent(${content.id})"><em class="voteContentCount">${content.vote_up!'0'}</em></span>
|
|
|
- <!--<span><img src="/jpress/static/jpress/admin/image/support.png" alt=""/><em>1</em></span>-->
|
|
|
+ <span><img img class="voteContent <#if content.isvoted(content.id, userId!0, userid!0)>voted</#if>" src="${CPATH}/static/jpress/admin/image/hands.png" alt="" onclick="voteContent(${content.id})"><em class="voteContentCount">${content.vote_up!'0'}</em></span>
|
|
|
</div>
|
|
|
<p>${(content.getMetadataByKey("copy_right"))!}</p>
|
|
|
</div>
|
|
|
@@ -274,7 +274,7 @@
|
|
|
<input type="hidden" name="uuUserAvatar" value="${iconurl!}" >
|
|
|
|
|
|
<div class="footer-header">
|
|
|
- <div class="infoMessage"><span>写留言</span><img src="/jpress/static/jpress/admin/image/pen.png" alt=""/></div>
|
|
|
+ <div class="infoMessage"><span>写留言</span><img src="${CPATH}/static/jpress/admin/image/pen.png" alt=""/></div>
|
|
|
<div class="writeMessage">
|
|
|
<textarea name="text" id="" cols="30" rows="10"></textarea>
|
|
|
<div><button class="cancel">取消</button><button type="submit">提交</button></div>
|
|
|
@@ -289,20 +289,25 @@
|
|
|
<div class="message">
|
|
|
<div class="left">
|
|
|
<div class="img" >
|
|
|
- <img src="${comment.uu_user_avatar!'/jpress/static/jpress/admin/image/dot.png'}" alt="用户头像">
|
|
|
+ <#if comment?? && comment.uu_user_avatar?? && comment.isImageExist(comment.uu_user_avatar)>
|
|
|
+ <img src="${(comment.uu_user_avatar)!}" alt="">
|
|
|
+ <#else>
|
|
|
+ <img src="${CPATH}/static/jpress/admin/image/defaultUuUserPhoto.png" alt="">
|
|
|
+ </#if>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
<div class="detail">
|
|
|
<div class="title">
|
|
|
<span>${comment.author!} <em>${(comment.created?string("yyyy-MM-dd"))!}</em></span>
|
|
|
- <span><img class="votedUas${comment.id} <#if comment.isvoted(comment.id, userId!0, userid!0)>voted</#if>" src="/jpress/static/jpress/admin/image/hands.png" alt="" onclick="vote(${comment.id})"/><em class="em${comment.id}">${(comment.vote_up)!'0'}</em></span>
|
|
|
+ <span><img class="votedUas${comment.id} <#if comment.isvoted(comment.id, userId!0, userid!0)>voted</#if>" src="${CPATH}/static/jpress/admin/image/hands.png" alt="" onclick="vote(${comment.id})"/><em class="em${comment.id}">${(comment.vote_up)!'0'}</em></span>
|
|
|
</div>
|
|
|
<p>${comment.text!}</p>
|
|
|
<#if comment.qc_content ??>
|
|
|
<div class="title reply">
|
|
|
<span>作者回复: <em>${(comment.qc_created?string("yyyy-MM-dd"))!}</em></span>
|
|
|
- <span><img class="votedUas${comment.qc_id} <#if comment.isvoted(comment.qc_id, userId!0, userid!0)>voted</#if>" src="/jpress/static/jpress/admin/image/hands.png" alt="" onclick="vote(${comment.qc_id})"/><em class="em${comment.qc_id}">${(comment.qc_vote_up)!'0'}</em></span>
|
|
|
+ <span><img class="votedUas${comment.qc_id} <#if comment.isvoted(comment.qc_id, userId!0, userid!0)>voted</#if>" src="${CPATH}/static/jpress/admin/image/hands.png" alt="" onclick="vote(${comment.qc_id})"/><em class="em${comment.qc_id}">${(comment.qc_vote_up)!'0'}</em></span>
|
|
|
</div>
|
|
|
<p>${comment.qc_content!}</p>
|
|
|
</#if>
|
|
|
@@ -314,79 +319,49 @@
|
|
|
</#if>
|
|
|
</@jp.commentPage>
|
|
|
</div>
|
|
|
- <div class="loading"><img src="/jpress/static/jpress/admin/image/loading.png" alt="" class="loadingImg"></div>
|
|
|
+ <div class="loading"><img src="${CPATH}/static/jpress/admin/image/loading.png" alt="" class="loadingImg"></div>
|
|
|
<div class="pull">下拉加载更多</div>
|
|
|
- <!--<div class="pull"><a>没有更多数据了</a></div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</body>
|
|
|
<script>
|
|
|
jQuery('html').css('fontSize',$(window).width()/640 * 30);
|
|
|
-// jQuery(window).load(function () {
|
|
|
-// jQuery("img").each(function () {
|
|
|
-// DrawImage(this, 300, 300);
|
|
|
-// });
|
|
|
-// });
|
|
|
-// function DrawImage(ImgD, FitWidth, FitHeight) {
|
|
|
-// var image = new Image();
|
|
|
-// image.src = ImgD.src;
|
|
|
-// if (image.width > 0 && image.height > 0) {
|
|
|
-// if (image.width / image.height >= FitWidth / FitHeight) {
|
|
|
-// if (image.width > FitWidth) {
|
|
|
-// ImgD.width = FitWidth;
|
|
|
-// ImgD.height = (image.height * FitWidth) / image.width;
|
|
|
-// } else {
|
|
|
-// ImgD.width = image.width;
|
|
|
-// ImgD.height = image.height;
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// if (image.height > FitHeight) {
|
|
|
-// ImgD.height = FitHeight;
|
|
|
-// ImgD.width = (image.width * FitHeight) / image.height;
|
|
|
-// } else {
|
|
|
-// ImgD.width = image.width;
|
|
|
-// ImgD.height = image.height;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// 写留言
|
|
|
+
|
|
|
$('.footer-header>div.infoMessage').click(function () {
|
|
|
$(this).next('.writeMessage').toggle()
|
|
|
})
|
|
|
- //点击取消按钮
|
|
|
$('.cancel').click(function () {
|
|
|
$(this).parent().parent('.writeMessage').css('display','none');
|
|
|
console.log($(this).parent().parent('.writeMessage'))
|
|
|
})
|
|
|
-// 上拉加载更多
|
|
|
- var aa = 2,
|
|
|
+ var aa = 1,
|
|
|
timers = null;
|
|
|
- //加载数据
|
|
|
var LoadingDataFn = function() {
|
|
|
- $.get("${CPATH}/comment/lazyLoad?contId=${(content.id)!}&pagesize=1&pagenumber="+aa+"&userId=${userId!0}&uuUserId=${userid!0}", function(result){
|
|
|
+ $.get("${CPATH}/comment/lazyLoad?contId=${(content.id)!}&CPATH=${CPATH!}&pagesize=3&pagenumber="+aa+"&userId=${userId!0}&uuUserId=${userid!0}", function(result){
|
|
|
var dom = '';
|
|
|
if ("" == result.message){
|
|
|
$('.pull').text("没有更多数据了");
|
|
|
$('.loading').css('display','none');
|
|
|
+ scrollResultMessage = "";
|
|
|
+
|
|
|
}
|
|
|
dom += result.message;
|
|
|
$('.footer-section').append(dom);
|
|
|
});
|
|
|
|
|
|
};
|
|
|
- //初始化
|
|
|
var userId = null;
|
|
|
var uuUserId = null;
|
|
|
$(document).ready(function() {
|
|
|
userId = "${userId!0}"
|
|
|
uuUserId = "${userid!0}";
|
|
|
- $('.voted').attr("src","/jpress/static/jpress/admin/image/support.png");
|
|
|
+ $('.voted').attr("src","${CPATH}/static/jpress/admin/image/support.png");
|
|
|
});
|
|
|
- //滚动加载方法
|
|
|
+
|
|
|
+ var scrollResultMessage = "初始化状态";
|
|
|
$(window).scroll(function() {
|
|
|
- if (($(window).height() + $(window).scrollTop() + 60) >= $(document).height()) {
|
|
|
+ if ("" != scrollResultMessage && ($(window).height() + $(window).scrollTop() + 60) >= $(document).height()) {
|
|
|
clearTimeout(timers);
|
|
|
timers = setTimeout(function() {
|
|
|
aa++;
|
|
|
@@ -396,36 +371,34 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- //点评论赞
|
|
|
var vote = function(commentid) {
|
|
|
var imgObj = $(".votedUas"+commentid);
|
|
|
var emObj = $(".em"+commentid);
|
|
|
if (imgObj.hasClass("voted")) {
|
|
|
emObj.text(""+(parseInt(emObj.text())-1));
|
|
|
imgObj.removeClass("voted");
|
|
|
- imgObj.attr("src","/jpress/static/jpress/admin/image/hands.png");
|
|
|
+ imgObj.attr("src","${CPATH}/static/jpress/admin/image/hands.png");
|
|
|
} else {
|
|
|
emObj.text(""+(parseInt(emObj.text())+1));
|
|
|
imgObj.addClass("voted");
|
|
|
- imgObj.attr("src","/jpress/static/jpress/admin/image/support.png")
|
|
|
+ imgObj.attr("src","${CPATH}/static/jpress/admin/image/support.png")
|
|
|
}
|
|
|
$.get("${CPATH}/comment/vote?comment_id="+commentid+"&user_id="+userId+"&uu_user_id="+uuUserId, function(result){
|
|
|
console.log(result.message);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- //点文章赞
|
|
|
var voteContent = function(contentId) {
|
|
|
var imgObj = $(".voteContent");
|
|
|
var emObj = $(".voteContentCount");
|
|
|
if (imgObj.hasClass("voted")) {
|
|
|
emObj.text(""+(parseInt(emObj.text())-1));
|
|
|
imgObj.removeClass("voted");
|
|
|
- imgObj.attr("src","/jpress/static/jpress/admin/image/hands.png");
|
|
|
+ imgObj.attr("src","${CPATH}/static/jpress/admin/image/hands.png");
|
|
|
} else {
|
|
|
emObj.text(""+(parseInt(emObj.text())+1));
|
|
|
imgObj.addClass("voted");
|
|
|
- imgObj.attr("src","/jpress/static/jpress/admin/image/support.png")
|
|
|
+ imgObj.attr("src","${CPATH}/static/jpress/admin/image/support.png")
|
|
|
}
|
|
|
$.get("${CPATH}/c/vote?content_id="+contentId+"&user_id="+userId+"&uu_user_id="+uuUserId, function(result){
|
|
|
console.log(result.message);
|