ajaxComment.html
2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!---晒单end-->
<if condition="$count gt 0">
<div class="comment_list" id="commentList">
<ul>
<foreach name="commentlist" item="v" key="k">
<li class="comment_item">
<div class="content_head" <if condition="($k+1) eq count($comment_list)"> style="border-bottom:0px solid #CCC;"<else/>style="border-bottom:1px solid #CCC;"</if>>
<div class="info">
<div class=" comment_star">
<div class="one"><em> <img src="{$v['head_pic']|default='__STATIC__/images/user68.jpg'}" style="width: 50px"><span>{$user['nickname']}</span></em></div>
<div class="name">
{$v.username}
<em><img src="__STATIC__/images/stars{$v.service_rank}.png" alt="" /></em>
</div>
<div class="two">{$v.add_time|date='Y-m-d H:i',###}</div>
</div>
</div>
<p> {$v['content']|htmlspecialchars_decode}</p>
<!---晒单-->
<if condition="$v['img'] neq ''">
<!--<div class="shaidan">
<h4>{$value.title}</h4>
<p>{$value.content}</p>
</div>-->
<div class="sd_img">
<dl id="gallery">
<foreach name="v['img']" key="key" item="v2">
<dd>
<a href="{$v2}"><img src="{$v2}" width="100px" heigth="100px"></a>
</dd>
</foreach>
</dl>
</div>
</if>
<!--管理员回复-->
<foreach name="replyList" item="val">
<p style=" color:#F60; border-top:1px dashed #e5e5e5; padding-top:8px; margin-top:10px"><span>管理员{$val.username}回复:<br></span>{$val.content}</p>
</foreach>
</div>
</li>
</foreach>
</ul>
<else/>
<script>
ajax_sourch_submit_hide();
</script>
<div class="comment_list" >
<div class="score">暂时还没有任何用户评论</div>
</div>
</if>
</div>
<if condition="($count gt $current_count) AND (count($commentlist) eq $page_count)">
<div class="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem; clear:both">
<a href="javascript:void(0)" onClick="ajax_sourch_submit();">点击加载更多</a>
</div>
<elseif condition="($count elt $current_count AND $count gt 0)" />
<div class="score">已显示完所有评论</div>
<else />
</if>
<script>
var page = {$p};
function ajax_sourch_submit() {
page += 1;
$.ajax({
type: "GET",
url:"/index.php?m=Mobile&c=Goods&a=ajaxComment&goods_id={$goods_id}&commentType={$commentType}&p="+page,//+tab,
success: function (data) {
$('.getmore').hide();
if ($.trim(data) != ''){
$("#commentList").append(data);
}
}
});
}
function ajax_sourch_submit_hide(){
$('.getmore').hide();
}
</script>