Authored by Rock Zhang

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

... ... @@ -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
}
}
## 个人中心
### 会员等级
... ... @@ -938,3 +978,11 @@
unshipped: true, //or 未发货
unreceived: '', //or 未收货,查看物流URL
}
### YOHO币
{
yohoCoin: {
coinNum: 10
}
}
\ No newline at end of file
... ...
$vip: sprite-map("me/vip/*.png");
$privilege: sprite-map("me/privilege/*.png");
.vip-grade-page {
background: #f0f0f0;
... ... @@ -134,38 +133,6 @@ $privilege: sprite-map("me/privilege/*.png");
height: pxToRem(70px);
}
.icon-discount {
@include rem-sprite($privilege, discount);
}
.icon-year {
@include rem-sprite($privilege, year);
}
.icon-vip {
@include rem-sprite($privilege, vip);
}
.icon-birth {
@include rem-sprite($privilege, birth);
}
.icon-msg {
@include rem-sprite($privilege, msg);
}
.icon-magazine {
@include rem-sprite($privilege, magazine);
}
.icon-arrival-soon {
@include rem-sprite($privilege, arrival-soon);
}
.icon-gift {
@include rem-sprite($privilege, gift);
}
li {
height: 70rem / $pxConvertRem;
padding: 25rem / $pxConvertRem 0;
... ...
@import "good", "chose-panel", "gift-advance-good";
@import "good", "chose-panel", "gift-advance-good", "order-ensure";
.icon-checkbox:before { content: "\e61c"; }
... ...
.order-ensure-page {
background: #f0f0f0;
.block {
background: #fff;
margin: 20rem / $pxConvertRem 0;
padding: 30rem / $pxConvertRem 20rem / $pxConvertRem;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
}
.title {
font-size: 26rem / $pxConvertRem;
font-weight: bold;
}
.address-wrap {
display: block;
position: relative;
margin-top: 0;
border-top: none;
> .iconfont {
position: absolute;
color: #bcbcbc;
right: 20rem / $pxConvertRem;
top: 50%;
margin-top: -8px;
}
.infos {
font-weight: bold;
font-size: 24rem / $pxConvertRem;
padding-right: 55rem / $pxConvertRem;
}
.per-info {
float: right;
}
.address {
display: block;
margin-top: 20rem / $pxConvertRem;
color: #bcbcbc;
font-weight: normal;
}
}
.dispatch .title {
margin-bottom: 10rem / $pxConvertRem;
}
.dispatch .sub-block:first-child {
border-bottom: 1px solid #f7f7f7;
margin-bottom: 15rem / $pxConvertRem;
}
.dispatch-mode li,
.dispatch-time li {
float: left;
padding: 10rem / $pxConvertRem 20rem / $pxConvertRem;
margin-right: 15rem / $pxConvertRem;
margin-bottom: 15rem / $pxConvertRem;
border: 1px solid #c9c9c9;
color: #676767;
font-size: 26rem / $pxConvertRem;
}
.goods {
margin-right: -20rem / $pxConvertRem;
}
.sale-invoice {
margin-top: -20rem / $pxConvertRem;
font-size: 24rem / $pxConvertRem;
li {
height: 90rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
border-bottom: 1px solid #f7f7f7;
}
.coupon-count {
padding: 5rem / $pxConvertRem;
background: #f00;
color: #fff;
@include border-radius(10px);
margin-left: 20rem / $pxConvertRem;
}
.coupon-use,
.coin-check {
float: right;
color: #999;
}
.coin-check {
float: right;
color: #999;
.checkbox {
margin-left: 5rem / $pxConvertRem;
color: #000;
}
}
.checkbox.icon-checkbox {
color: #999;
}
.invoice .checkbox {
float: right;
}
.desc {
color: #999;
}
}
.total {
font-size: 22rem / $pxConvertRem;
margin-top: 20rem / $pxConvertRem;
span {
display: inline-block;
width: 130rem / $pxConvertRem;
}
}
.cost {
border-top: 1px solid #f7f7f7;
line-height: 100rem / $pxConvertRem;
margin-top: 10rem / $pxConvertRem;
font-size: 34rem / $pxConvertRem;
em {
color: #f00;
}
}
.pay-mode {
background: #fff;
padding: 0 20rem / $pxConvertRem;
margin-top: -22rem / $pxConvertRem;
li {
height: 88rem / $pxConvertRem;
line-height: 88rem / $pxConvertRem;
margin-bottom: 28rem / $pxConvertRem;
@include border-radius(5px);
font-size: 32rem / $pxConvertRem;
color: #fff;
text-align: center;
}
.cod {
background: #000;
}
.pay-online {
background: #57b038;
}
}
}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="yoho-coin-page yoho-page">
{{# yohoCoin}}
<p class="coin-num">
<em>{{coinNum}}</em>
YOHO币
</p>
<section>
<p class="title">YOHO币</p>
<hr>
<p>
<span class="sub-title">YOHO币是什么,有什么用?</span>
YOHO币是有货商城的虚拟货币,与现金比例1:1,没有任何使用期限,YOHO币可直接用于有货线上购物使用,不可转让他人,不可兑换为现金。使用YOHO币支付的金额不可计入消费金额。
</p>
<p>
<span class="sub-title">如何查看自己的YOHO币?</span>
<span class="path">登录 > 个人中心 > 我的YOHO币</span>
</p>
<p>
<span class="sub-title">YOHO币如何购买支付?</span>
在购买支付页面输入您要使用的YOHO币金额即可完成支付
<div class="remark">
<span>※ </span>
如果超过了我们约定的期限的非正常退货,我们将会于您的退款金额中直接扣除赠送YOHO币等值的金额。赠送给您的YOHO币还将保留在您的账户中,敬请谅解。
</div>
</p>
</section>
{{/ yohoCoin}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="yoho-coin-page yoho-page">
{{# yohoCoin}}
<p class="coin-num">
<em>{{coinNum}}</em>
YOHO币
</p>
<section>
<p class="title">YOHO币</p>
<hr>
<p>
<span class="sub-title">YOHO币是什么,有什么用?</span>
YOHO币是有货商城的虚拟货币,与现金比例1:1,没有任何使用期限,YOHO币可直接用于有货线上购物使用,不可转让他人,不可兑换为现金。使用YOHO币支付的金额不可计入消费金额。
</p>
<p>
<span class="sub-title">如何查看自己的YOHO币?</span>
<span class="path">登录 > 个人中心 > 我的YOHO币</span>
</p>
<p>
<span class="sub-title">YOHO币如何购买支付?</span>
在购买支付页面输入您要使用的YOHO币金额即可完成支付
<div class="remark">
<span>※ </span>
如果超过了我们约定的期限的非正常退货,我们将会于您的退款金额中直接扣除赠送YOHO币等值的金额。赠送给您的YOHO币还将保留在您的账户中,敬请谅解。
</div>
</p>
</section>
{{/ yohoCoin}}
</div>
{{> layout/footer}}
\ No newline at end of file
{{> layout/header}}
<div class="order-ensure-page yoho-page">
{{# orderEnsure}}
<a class="address-wrap block">
<p class="infos">
收货地址
<span class="per-info">{{name}} {{phoneNum}}</span>
<span class="address">{{address}}</span>
</p>
<span class="iconfont">&#xe614;</span>
</a>
<section class="dispatch block">
<div class="sub-block">
<h3 class="title">配送方式</h3>
<ul class="dispatch-mode clearfix">
{{#each dispatchMode}}
<li data-id="{{id}}">{{name}}</li>
{{/each}}
</ul>
</div>
<div class="sub-block">
<h3 class="title">送货时间</h3>
<ul class="dispatch-time clearfix">
{{#each dispatchTime}}
<li data-id="{{id}}">{{name}}</li>
{{/each}}
</ul>
</div>
</section>
<section class="block">
<h3 class="title">商品</h3>
<div class="goods">
{{#each goods}}
{{> me/order/good}}
{{/each}}
</div>
</section>
<section class="block">
<ul class="sale-invoice">
{{# 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 coupon-use">
未使用
<i class="iconfont">&#xe614;</i>
</span>
{{^}}
<span class="used coupon-use">
{{value}}
<i class="iconfont">&#xe614;</i>
</span>
{{/if}}
</a>
</li>
{{/ coupon}}
{{# yohoCoin}}
<li class="coin">
<span class="title">YOHO币</span>
<span class="desc">可抵用¥{{.}}</span>
<span class="coin-check">
<em>- ¥ {{.}}</em>
<i class="iconfont checkbox icon-cb-checked"></i>
</span>
</li>
{{/ yohoCoin}}
{{# invoice}}
<li class="invoice">
<span class="title">发票</span>
<span class="iconfont checkbox icon-checkbox"></span>
</li>
{{/ invoice}}
</ul>
<ul class="total">
<li>
<span>总价</span>
&nbsp;&nbsp;¥ {{sumPrice}}
</li>
<li>
<span>活动价</span>
- ¥ {{salePrice}}
</li>
<li>
<span>运费</span>
+ ¥ {{freight}}
</li>
<li>
<span>YOHO币</span>
- ¥ {{yohoCoin}}
</li>
<li class="cost">
应付金额: <em>¥{{price}}</em>
</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
... ...
... ... @@ -158,7 +158,6 @@ class HomeController extends AbstractAction
$favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
print_r($favBrands);
}
/**
... ... @@ -187,7 +186,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)));
}
/**
... ...
... ... @@ -51,22 +51,89 @@ class ShoppingCartController extends AbstractAction
)
);
// $data = array(
// 'gift' => array(
// 'id' => 1,
// 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/09/17/03/014cacfa5c458b9732c68adf1af15d7a45.jpg?imageMogr2/thumbnail/120x120/extent/120x120/background/d2hpdGU=/position/center/quality/90',
// 'name' => 'Life.After.Life纯棉短袜',
// 'color' => '黄色',
// 'size' => 'L',
// 'price' => 0,
// 'count' => 1
// )
// );
$data = array(
'gift' => array(
'id' => 1,
'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/09/17/03/014cacfa5c458b9732c68adf1af15d7a45.jpg?imageMogr2/thumbnail/120x120/extent/120x120/background/d2hpdGU=/position/center/quality/90',
'name' => 'Life.After.Life纯棉短袜',
'color' => '黄色',
'size' => 'L',
'price' => 0,
'count' => 1
)
);
$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/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'Adidas Originals ZX FLUXM22508',
'color' => '黄',
'size' => '43',
'price' => '699.00',
'count' => '2'
),
array(
'id' => 1,
'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/11/04/05/0188f1aca49ac478a565ec029b5d2d4a6c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'B.Duck浴室玩伴mini浮水鸭',
'gift' => true,
'color' => '黄',
'size' => '43',
'price' => '0.00',
'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内容
*/
... ...