2019-09-06 23:53:10 +08:00

108 lines
3.7 KiB
HTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{extend name="default/users/base" /}
{block name="title"}购买咨询 - 买家中心{__block__}{/block}
{block name="css"}
{/block}
{block name="content"}
<div class="wst-user-head"><span>购买咨询</span></div>
<div class='wst-user-content'>
<table class='wst-order-list'>
<thead>
<tr class='head'>
<th width="10%">咨询商品</th>
<th width="20%">商品名称</th>
<th>咨询回复</th>
</tr>
</thead>
<tbody id='loadingBdy'>
<tr id='loading' class='empty-row' style='display:none'>
<td colspan='4'><img src="__STYLE__/img/loading.gif">正在加载数据...</td>
</tr>
</tbody>
<script id="tblist" type="text/html">
{{# for(var i = 0; i < d.length; i++){ }}
<tbody class="j-order-row">
<tr>
<td width="10%" class="tc g_bd">
<a href="{{WST.U('home/goods/detail','id='+d[i].goodsId)}}" target="_blank" class="gc_a">
<img class="gImg" src="__IMGURL__/{{d[i].goodsImg}}" width="60" height="60">
</a>
</td>
<td width="20%" class="pd10 g_bd">
<a href="{{WST.U('home/goods/detail','id='+d[i].goodsId)}}" target="_blank" class="gc_a">{{d[i].goodsName}}</a>
</td>
<td class="pd10 g_bd" style="vertical-align:top">
<div class="my_consultbox">
<span class="my_consult">我的咨询{{d[i].consultContent}}</span>
<span class="consult_time c999">{{d[i].createTime}}</span>
<div class="wst-clear"></div>
</div>
{{# if(WST.blank(d[i].reply)!=''){ }}
<div class="gc_replytit">
商家回复
</div>
<div>
{{d[i].reply}}
</div>
<div class="c999">{{d[i].replyTime}}</div>
{{# }else{ }}
<div class="gc_replytit">(暂无回复)</div>
{{# } }}
</td>
</tr>
</tbody>
{{# } }}
</script>
<tr class='empty-row'>
<td colspan='4' id='pager' align="center" style='padding:5px 0px 5px 0px'>&nbsp;</td>
</tr>
</table>
</div>
{/block}
{block name="js"}
<script>
$(function(){
myConsultByPage();
})
function gDetail(id){
return WST.U('home/goods/detail',{id:id});
}
function myConsultByPage(p){
$('#loading').show();
var params = {};
params = WST.getParams('.s-query');
params.key = $.trim($('#key').val());
params.page = p;
$.post(WST.U('home/goodsconsult/myConsultByPage'),params,function(data,textStatus){
$('#loading').hide();
var json = WST.toJson(data);
$('.j-order-row').remove();
if(json.status==1){
json = json.data;
if(params.page>json.TotalPage && json.TotalPage >0){
myConsultByPage(json.TotalPage);
return;
}
var gettpl = document.getElementById('tblist').innerHTML;
laytpl(gettpl).render(json.Rows, function(html){
$(html).insertAfter('#loadingBdy');
$('.gImg').lazyload({ effect: "fadeIn",failurelimit : 10,skip_invisible : false,threshold: 200,placeholder:window.conf.IMGURL+'/'+WST.conf.GOODS_LOGO});
});
laypage({
cont: 'pager',
pages:json.TotalPage,
curr: json.CurrentPage,
skin: '#e23e3d',
groups: 3,
jump: function(e, first){
if(!first){
myConsultByPage(e.curr);
}
}
});
}
});
}
</script>
{/block}