Authored by xuqi

order with opt

... ... @@ -899,7 +899,7 @@
### 我的订单
{
order: {
allOrders: [
orders: [
...
]
}
... ... @@ -925,5 +925,10 @@
...
],
count: 1,
sumCost: '199.00'
sumCost: '199.00',
//status
completed: true, //已完成
unpaid: true, //or 未支付
unshipped: true, //or 未发货
unreceived: '', //or 未收货,查看物流URL
}
\ No newline at end of file
... ...
... ... @@ -30,6 +30,33 @@
.sum-cost {
color: #e01;
}
.order-opt {
padding: 30rem / $pxConvertRem 0;
padding-right: 30rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
text-align: right;
> .btn {
display: inline-block;
box-sizing: border-box;
height: 60rem / $pxConvertRem;
line-height: 60rem / $pxConvertRem;
width: 140rem / $pxConvertRem;
font-size: 24rem / $pxConvertRem;
text-align: center;
}
.cancel {
border: 1px solid #000;
}
.pay {
background: #d0021b;
color: #fff;
margin-left: 20rem / $pxConvertRem;
}
}
}
}
... ...
... ... @@ -18,11 +18,11 @@
<div id="order-container" class="order-container">
<div class="all orders">
{{# allOrders}}
{{#each orders}}
{{> me/order/order}}
{{/ allOrders}}
{{/each}}
</div>
<div class="obligation orders hide"></div>
<div class="unpaid orders hide"></div>
<div class="unshipped orders hide"></div>
<div class="unreceived orders hide"></div>
</div>
... ...
<div class="order">
<div class="order" data-id="{{orderNum}}">
<header class="header">
订单编号:{{orderNum}}
<span class="trading-status">{{tradingStatus}}</span>
... ... @@ -11,4 +11,17 @@
<footer class="footer">
共{{count}}件商品 实付<span class="sum-cost">¥{{sumCost}}</span>
</footer>
{{#if unpaid}}
<div class="order-opt">
<span class="btn cancel">取消订单</span>
<span class="btn pay">立即付款</span>
</div>
{{/if}}
{{#with unreceived}}
<div class="order-opt">
<a class="check-logistics" href="{{.}}">查看物流</a>
</div>
{{/with}}
</div>
\ No newline at end of file
... ...
... ... @@ -45,7 +45,7 @@ class HomeController extends AbstractAction
// $orders = \Index\UserModel::getUserOrderData(967016, $type);
$order = array(
'allOrders' => array(
'orders' => array(
array(
'orderNum' => '408539077',
'tradingStatus' => '交易成功',
... ... @@ -71,7 +71,8 @@ class HomeController extends AbstractAction
)
),
'count' => 2,
'sumCost' => '699.00'
'sumCost' => '699.00',
'unpaid' => true,
)
)
);
... ...