订单管理
模板:
user/order.html
列表输出的是orders
表里面的内容
{foreach $lists as $v}
<li>
<div class="record-item">
<p><span>下单时间:{$v['date']}</span>
{if($v['isshow']==1)}
<span class="fr btn-sm btn-info">待支付</span>
{else if($v['isshow']==2)}
<span class="fr btn-sm btn-success">交易成功</span>
{else if($v['isshow']==3)}
<span class="fr btn-sm btn-danger">已超时</span>
{else if($v['isshow']==4)}
<span class="fr btn-sm btn-warning">待发货</span>
{else if($v['isshow']==5)}
<span class="fr btn-sm btn-success">已发货</span>
{else}
<span class="fr btn-sm btn-warning">已废弃</span>
{/if}
</p>
<p><span>订单号:<a href="{$v['details']}">{$v['orderno']}</a></span></p>
<p><span>交易类型:{$v['paytype']}</span></p>
<h4><span class="text-info">¥{$v['price']}</span><span class="fr"><a href="javascript:;" onclick="javascript:if(confirm('您确定要删除吗?'))window.location.href='{$v['del']}'" class="change" title="删除">删除</a><a href="{$v['details']}" class="btn-more" title="查看详情">查看详情</a></span></h4>
</div>
</li>
{/foreach}
订单详情
模板:
user/orderdetails.html
{foreach $carts as $v}
{if($v['info'])}
<li>
<div class="order-item">
<div class="img-box">
<a href="{fun gourl($v['info']['id'],$v['info']['htmlurl'])}"><img src="{$v['info']['litpic']}" ></a>
</div>
<div class="order-title">
<a href="{fun gourl($v['info']['id'],$v['info']['htmlurl'])}" target="_blank">{$v['info']['title']}</a>
</div>
</div>
<div class="order-item-right">
<div class="order-number">
<p>数量</p>
<p>{$v['num']}</p>
</div>
<input id="price_per_{$v['tid']}_{$v['info']['id']}" value="{$v['info']['price']}" type="hidden" />
<div class="order-money">
<p>单价</p>
<p class="price">¥{$v['price']}</p>
</div>
</div>
</li>
{else}
<li>
<div class="order-item">
<div class="img-box">
<a >[ 无 ]</a>
</div>
<div class="order-title">
<h4><a >[{$v['id']}][ 商品已被删除 ]</a></h4>
</div>
</div>
<div class="order-item-right">
<div class="order-number">
<p>数量</p>
<p>{$v['num']}</p>
</div>
<div class="order-money">
<p>单价</p>
<p class="price">¥{$v['price']}</p>
</div>
</div>
</li>
{/if}
{/foreach}