默认的模板订单列表筛选只有两个,太少了,体验比较差
经改造后,增加到五个或者更多,如下图
主要修改了文件:/application/common/controller/member/Order.php
照原代码增加以下代码:
elseif($type=='isshipping'){ $map[ 'shipping_status'] = 1; } elseif($type=='noshipping'){ $map[ 'shipping_status'] = 0; } elseif($type=='isreceive'){ $map[ 'receive_status'] = 1; }
前端模板代码:
{php}$type||$type=0; $house[$type]="active";{/php} <div class="btn-group btn-group-yellow btn-group-bg"> <a class="btn-group-item {$house[0]}" href="{:urls('index')}">全部订单</a> <a class="btn-group-item {$house['nopay']}" href="?type=nopay">待付款</a> <a class="btn-group-item {$house['ispay']}" href="?type=ispay">已付款</a> <a class="btn-group-item {$house['noshipping']}" href="?type=noshipping">待发货</a> <a class="btn-group-item {$house['isshipping']}" href="?type=isshipping">已发货</a> <a class="btn-group-item {$house['isreceive']}" href="?type=isreceive">已签收</a> </div>