Authored by xuqi

build order ensure

... ... @@ -876,6 +876,46 @@
count: 3
}
### 订单确认
{
orderEnsure: {
name: '',
phoneName: '',
address: '',
dispatchMode: [
{
id: 1,
name: '普通快递'
},
...
],
dispatchTime: [
{
id: 1,
name: '只工作日配送'
},
...
],
goods: [
{
... //购物车商品
}
],
coupon: {
count: 3, //N张优惠券可用
notUsed: true,
value: 10 //使用优惠券后优惠额,notUsed为true的情况下可不传
},
yohoCoin: '0', //String
invoice: true, //发票
sumPrice: 900,
salePrice: 90,
freight: 0,
price: 800
}
}
## 个人中心
### 会员等级
... ... @@ -937,4 +977,12 @@
unpaid: true, //or 未支付
unshipped: true, //or 未发货
unreceived: '', //or 未收货,查看物流URL
}
### YOHO币
{
yohoCoin: {
coinNum: 10
}
}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="order-ensure-page yoho-page">
{{# orderEnsure}}
<section class="block">
<p>
收货地址
<span class="per-info">{{name}} {{phoneNum}}</span>
</p>
<p class="address">
{{address}}
</p>
</section>
<section class="block">
<div class="sub-block">
<h3 class="title">配送方式</h3>
<ul class="dispatch-mode">
{{#each dispatchMode}}
<li data-id="{{id}}">{{name}}</li>
{{/each}}
</ul>
</div>
<div class="sub-block">
<h3 class="title">送货时间</h3>
<ul class="dispatch-time">
{{#each dispatchTime}}
<li data-id="{{id}}">{{name}}</li>
{{/each}}
</ul>
</div>
</section>
<section class="block">
<h3 class="title">商品</h3>
<div class="goods">
{{#each goods}}
{{> shopping-cart/good}}
{{/each}}
</div>
</section>
<section class="block">
<ul>
{{# coupon}}
<li class="coupon">
<a href="{{url}}">
<span class="title">优惠券</span>
{{#if count}}
<span class="coupon-count">
{{count}}张可用
</span>
{{/if}}
{{#if notUsed}}
<span class="not-used">
未使用
<i class="iconfont">&#xe614;</i>
</span>
{{^}}
<span class="used">-¥{{value}}</span>
{{/if}}
<span></span>
</a>
</li>
{{/ coupon}}
{{# yohoCoin}}
<li class="coin">
<span class="title">YOHO币</span>
<span class="desc">可抵用¥{{.}}</span>
<span class="coin-check">
{{.}}
<i class="iconfont checkbox icon-cb-checked"></i>
</span>
</li>
{{/ yohoCoin}}
{{# invoice}}
<li class="invoice">
<span class="title">发票</span>
<span class="iconfont checkbox icon-cb"></span>
</li>
{{/ invoice}}
</ul>
<ul class="total">
<li>
<span>总价</span>
¥{{sumPrice}}
</li>
<li>
<span>活动价</span>
{{salePrice}}
</li>
<li>
<span>运费</span>
{{freight}}
</li>
<li>
<span>YOHO币</span>
{{yohoCoin}}
</li>
<li>
应付金额: ¥{{price}}
</li>
</ul>
</section>
<ul class="pay-mode">
<li class="cod">
<span class="iconfont"></span>
货到付款
</li>
<li class="pay-online">
<span class="iconfont"></span>
在线支付
</li>
</ul>
{{/ orderEnsure}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -128,7 +128,6 @@ class HomeController extends AbstractAction
$favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
print_r($favBrands);
}
/**
... ... @@ -157,7 +156,7 @@ class HomeController extends AbstractAction
print_r($favBrands);
$this->_view->display('yoho-coin', array('yohoCoin' => array('coinNum' => 0)));
$this->_view->display('currency', array('yohoCoin' => array('coinNum' => 0)));
}
/**
... ...
... ... @@ -66,6 +66,62 @@ class ShoppingCartController extends AbstractAction
$this->_view->display('gift-advance', array('giftAdvancePage' => true, 'pageHeader' => array(
'navBack' => true, 'navTitle' => '加价购'), 'shoppingCart' => $data));
}
public function orderEnsureAction() {
$data = array(
'orderEnsure' => array(
'name' => '申建军',
'phoneNum' => '12345678',
'address' => '江苏省南京市建邺区',
'dispatchMode' => array(
array(
'id' => 1,
'name' => '普通快递¥10'
),
array(
'id' => 2,
'name' => '顺丰速运¥15(仅支持顺丰克配送的地区)'
)
),
'dispatchTime' => array(
array(
'id' => 1,
'name' => '工作日、双休日、节假日均可送货'
),
array(
'id' => 2,
'name' => '只工作日送货'
),
array(
'id' => 3,
'name' => '只双休日、节假日送货'
)
),
'goods' => array(
array(
'id' => 1,
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/03/10/01bc1878f9154e77ac4f7a6003c954f1b8.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => '银鳞堂民族风牛皮手绳',
'salePrice' => 9,
'price' => 19,
'count' => 1
)
),
'coupon' => array(
'count' => 1,
'notUsed' => true
),
'yohoCoin' => '0',
'invoice' => true,
'sumPrice' => 900,
'salePrice' => 90,
'freight' => 0,
'price' => 810
)
);
$this->_view->display('order-ensure', $data);
}
/**
* 读取chose-panel内容
... ...