ajaxComment.html
4.15 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<style>.xc-middle .xc-pirces{ height: auto}
.parameter-dian{line-height: 17px;}</style>
<!---晒单end-->
<if condition="$count gt 0">
<foreach name="commentlist" item="v" key="k" >
<div style='border-bottom:0.06rem solid #eee;'>
<div class="xc-middle">
<div class="middle-img-frame" >
<img class="middle-img circle" src="{$v['head_pic']|default='__STATIC__/images/user68.jpg'}"onerror="this.src='__PUBLIC__/images/not_adv.jpg';this.onerror=null"></img>
<div class="middle-user-frame" style="overflow: visible;margin-top: 0.03rem;">
<div class="fs025 flex" style="height: 0.3rem; display: flex">{$v.username==''?'匿名用户':$v.username}
<if condition="$new_card_dd[$v['card_field']]">
<div class="xc-black-code xc-black flex ai_center jc_center fc " >
<img class="xc-black-img"src="__STATIC__/images/weixin/user.png"onerror="this.src='{$noimg}';this.onerror=null"/>
{$new_card_dd[$v['card_field']]}
</div>
</if>
</div>
<for start="0" end="$v.service_rank"><img class="star" style="margin-top: 0.04rem" src="__STATIC__/images/weixin/xin.png" onerror="this.src='{$noimg}';this.onerror=null"/></for>
</div>
</div>
<div class="xc-pirces">
<text>{$v.content?$v.content:''}</text>
</div>
<div style="clear: both"></div>
<!--有图-->
<if condition="$v.img">
<div class="iddle-goods-img">
<foreach name="$v.img" item="v2">
<img class="goods-img-nyf" src="{:getimg($v2,NOIMG)}"onerror="this.src='{$noimg}';this.onerror=null"/>
</foreach>
</div>
</if>
<div class="z_parameter flex jc_sb">
<text class="fs020" style="margin-top: 0.14rem;">{$v.add_time|date='Y-m-d H:i',###}</text></text >
<div class="parameter-dian" onclick="dian_zan(this)" com_id="{$v.comment_id}" >
<if condition="$v.iszan" >
<img ty="1" class="parameter-img" src="__STATIC__/images/weixin/dianzanred.png" onerror="this.src='__PUBLIC__/images/not_adv.jpg';this.onerror=null">
<div class="parameter-val fs14" style="color:#d60022">{$v.zannum}</div>
<else/>
<img ty="0" class="parameter-img" src="__STATIC__/images/weixin/dianzane.png" onerror="this.src='__PUBLIC__/images/not_adv.jpg';this.onerror=null">
<div class="parameter-val fs14" style="color:#8a8a8a">{$v.zannum}</div>
</if>
</div>
</div>
<!--商家回复-->
<if condition="$v['replylist']">
<div class="reply rel" >
<div class="line_bulge"></div>
<div class="shop-reply">店家回复: </div>
<foreach name="$v['replylist']" item="val">
<div class="shop-font fs020">{$val.content}</div>
</foreach>
</div>
</if>
</div>
</div>
</foreach>
<else/>
<script>
function ajax_sourch_submit_hide(){
$('.getmore').hide();
}
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>
$(document).ready(function () {
var gallery_a = $(".gallery a");
if(gallery_a.length > 0){
$(".gallery a").photoSwipe({
enableMouseWheel: false,
enableKeyboard: false,
allowUserZoom: false,
loop:false
});
}
});
var page = {$p};
var stoid="<?php echo I("stoid") ?>";
function ajax_sourch_submit() {
page += 1;
$.ajax({
type: "GET",
url:"/index.php?m=Mobile&c=Goods&a=ajaxComment&goods_id={$goods_id}&stoid="+stoid+"&commentType={$commentType}&p="+page,//+tab,
success: function (data) {
$('.getmore').hide();
if ($.trim(data) != ''){
$("#ECS_COMMENT").append(data);
}
}
});
}
</script>