名称: msg_list
功能: 读取会员留言列表
示例:
{if($msg_list)} <div class="row"> <div class="col-md-12 col-sm-12"> {loop $msg_list $k1 $v1} {php}$msg_list_n = isset($msg_list_n)?$msg_list_n+1:1;{/php} <div class="panel panel-default data-list-{$v1['id']}" data-json='{php}echo json_encode($v1);{/php}'> <div class="panel-heading"> <h4 class="panel-title" title="{php}echo date('Y-m-d H:i:s', $v1['atime']);{/php}"> <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion1" href="#accordion1_{$k1}" index="fc"> #{$msg_list_n}. {$v1['title']} </a> <a href="javascript:apps['member-msg-edit']({$v1['id']});" class="pull-right fa fa-pencil-square" title="edit"></a> <a href="javascript:apps['member-msg-reply']({$v1['id']});" class="pull-right fa fa-reply" title="reply"></a> </h4> </div> <div id="accordion1_{$k1}" class="panel-collapse collapse" style="height: 0px;"> <div class="panel-body">{$v1['content']} {if($v1['reply'])} {loop $v1['reply'] $k2 $v2} <div class="panel-body {$v2['user_id']<1?'text-success':''}" title="{php}echo date('Y-m-d H:i:s', $v2['atime']);{/php}"> <i class="fa fa-quote-left"></i> {$v2['content']} <i class="fa fa-quote-right"></i> </div> {/loop} {/if} </div> </div> </div> {/loop} </div> </div> {/if}
数据格式打印:
Array ( [7] => Array ( [id] => 7 [user_id] => 1 [title] => 请问下单后多久才能发货呢?在线支付退货时候是怎么退款的呢? [content] => 请问下单后多久才能发货呢?在线支付退货时候是怎么退款的呢?请问下单后多久才能发货呢?在线支付退货时候是怎么退款的呢?请问下单后多久才能发货呢?在线支付退货时候是怎么退款的呢?请问下单后多久才能发货呢?在线支付退货时候是怎么退款的呢?1.1 [atime] => 1528717493 [reply] => Array ( [0] => Array ( [id] => 8 [msg_id] => 7 [user_id] => 0 [content] => 正常工作日当天发货,活动期间根据订单先后顺序安排发货 [atime] => 1534658445 ) ) ) )