Authored by ccbikai

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

@@ -876,6 +876,46 @@ @@ -876,6 +876,46 @@
876 count: 3 876 count: 3
877 } 877 }
878 878
  879 +### 订单确认
  880 +
  881 + {
  882 + orderEnsure: {
  883 + name: '',
  884 + phoneName: '',
  885 + address: '',
  886 + dispatchMode: [
  887 + {
  888 + id: 1,
  889 + name: '普通快递'
  890 + },
  891 + ...
  892 + ],
  893 + dispatchTime: [
  894 + {
  895 + id: 1,
  896 + name: '只工作日配送'
  897 + },
  898 + ...
  899 + ],
  900 + goods: [
  901 + {
  902 + ... //订单商品
  903 + }
  904 + ],
  905 + coupon: {
  906 + count: 3, //N张优惠券可用
  907 + notUsed: true,
  908 + value: 10 //使用优惠券后优惠额,notUsed为true的情况下可不传
  909 + },
  910 + yohoCoin: '0', //String
  911 + invoice: true, //发票
  912 + sumPrice: 900,
  913 + salePrice: 90,
  914 + freight: 0,
  915 + price: 800
  916 + }
  917 + }
  918 +
879 ## 个人中心 919 ## 个人中心
880 920
881 ### 会员等级 921 ### 会员等级
@@ -938,3 +978,11 @@ @@ -938,3 +978,11 @@
938 unshipped: true, //or 未发货 978 unshipped: true, //or 未发货
939 unreceived: '', //or 未收货,查看物流URL 979 unreceived: '', //or 未收货,查看物流URL
940 } 980 }
  981 +
  982 +### YOHO币
  983 +
  984 + {
  985 + yohoCoin: {
  986 + coinNum: 10
  987 + }
  988 + }
@@ -139,7 +139,7 @@ $('.maybe-like p').on('touchstart', function (e) { @@ -139,7 +139,7 @@ $('.maybe-like p').on('touchstart', function (e) {
139 139
140 //srcoll to load more 140 //srcoll to load more
141 $(window).scroll(function () { 141 $(window).scroll(function () {
142 - if ($(window).scrollTop() + winH >= $(document).height()) { 142 + if ($(window).scrollTop() + winH >= $(document).height() - 50) {
143 search(); 143 search();
144 } 144 }
145 }); 145 });
@@ -41,7 +41,7 @@ if ($('#float-layer-btn') && $('#float-layer-btn')[0]) { @@ -41,7 +41,7 @@ if ($('#float-layer-btn') && $('#float-layer-btn')[0]) {
41 e.srcEvent.stopPropagation(); 41 e.srcEvent.stopPropagation();
42 }); 42 });
43 43
44 - if (!window.cookie('_float-layer-app')) { 44 + if (typeof window.cookie === 'function' && !window.cookie('_float-layer-app')) {
45 $('#float-layer-app').show(); 45 $('#float-layer-app').show();
46 } else { 46 } else {
47 $('#float-layer-app').hide(); 47 $('#float-layer-app').hide();
@@ -56,9 +56,7 @@ @@ -56,9 +56,7 @@
56 56
57 .good-detail-img { 57 .good-detail-img {
58 position: relative; 58 position: relative;
59 - display: table-cell;  
60 height: 368rem / $pxConvertRem; 59 height: 368rem / $pxConvertRem;
61 - vertical-align: middle;  
62 60
63 .good-islike { 61 .good-islike {
64 position: absolute; 62 position: absolute;
@@ -79,7 +77,7 @@ @@ -79,7 +77,7 @@
79 img { 77 img {
80 display: block; 78 display: block;
81 width: 100%; 79 width: 100%;
82 - max-height: 368rem / $pxConvertRem; 80 + height: 368rem / $pxConvertRem;
83 } 81 }
84 82
85 .few-tag { 83 .few-tag {
1 $vip: sprite-map("me/vip/*.png"); 1 $vip: sprite-map("me/vip/*.png");
2 -$privilege: sprite-map("me/privilege/*.png");  
3 2
4 .vip-grade-page { 3 .vip-grade-page {
5 background: #f0f0f0; 4 background: #f0f0f0;
@@ -134,38 +133,6 @@ $privilege: sprite-map("me/privilege/*.png"); @@ -134,38 +133,6 @@ $privilege: sprite-map("me/privilege/*.png");
134 height: pxToRem(70px); 133 height: pxToRem(70px);
135 } 134 }
136 135
137 - .icon-discount {  
138 - @include rem-sprite($privilege, discount);  
139 - }  
140 -  
141 - .icon-year {  
142 - @include rem-sprite($privilege, year);  
143 - }  
144 -  
145 - .icon-vip {  
146 - @include rem-sprite($privilege, vip);  
147 - }  
148 -  
149 - .icon-birth {  
150 - @include rem-sprite($privilege, birth);  
151 - }  
152 -  
153 - .icon-msg {  
154 - @include rem-sprite($privilege, msg);  
155 - }  
156 -  
157 - .icon-magazine {  
158 - @include rem-sprite($privilege, magazine);  
159 - }  
160 -  
161 - .icon-arrival-soon {  
162 - @include rem-sprite($privilege, arrival-soon);  
163 - }  
164 -  
165 - .icon-gift {  
166 - @include rem-sprite($privilege, gift);  
167 - }  
168 -  
169 li { 136 li {
170 height: 70rem / $pxConvertRem; 137 height: 70rem / $pxConvertRem;
171 padding: 25rem / $pxConvertRem 0; 138 padding: 25rem / $pxConvertRem 0;
1 -@import "good", "chose-panel", "gift-advance-good"; 1 +@import "good", "chose-panel", "gift-advance-good", "order-ensure";
2 2
3 3
4 .icon-checkbox:before { content: "\e61c"; } 4 .icon-checkbox:before { content: "\e61c"; }
  1 +.order-ensure-page {
  2 + background: #f0f0f0;
  3 +
  4 + .block {
  5 + background: #fff;
  6 + margin: 20rem / $pxConvertRem 0;
  7 + padding: 30rem / $pxConvertRem 20rem / $pxConvertRem;
  8 + border-top: 1px solid #e0e0e0;
  9 + border-bottom: 1px solid #e0e0e0;
  10 + }
  11 +
  12 + .title {
  13 + font-size: 26rem / $pxConvertRem;
  14 + font-weight: bold;
  15 + }
  16 +
  17 + .address-wrap {
  18 + display: block;
  19 + position: relative;
  20 + margin-top: 0;
  21 + border-top: none;
  22 +
  23 + > .iconfont {
  24 + position: absolute;
  25 + color: #bcbcbc;
  26 + right: 20rem / $pxConvertRem;
  27 + top: 50%;
  28 + margin-top: -8px;
  29 + }
  30 +
  31 + .infos {
  32 + font-weight: bold;
  33 + font-size: 24rem / $pxConvertRem;
  34 + padding-right: 55rem / $pxConvertRem;
  35 + }
  36 +
  37 + .per-info {
  38 + float: right;
  39 + }
  40 +
  41 + .address {
  42 + display: block;
  43 + margin-top: 20rem / $pxConvertRem;
  44 + color: #bcbcbc;
  45 + font-weight: normal;
  46 + }
  47 + }
  48 +
  49 + .dispatch .title {
  50 + margin-bottom: 10rem / $pxConvertRem;
  51 + }
  52 +
  53 + .dispatch .sub-block:first-child {
  54 + border-bottom: 1px solid #f7f7f7;
  55 + margin-bottom: 15rem / $pxConvertRem;
  56 + }
  57 +
  58 + .dispatch-mode li,
  59 + .dispatch-time li {
  60 + float: left;
  61 + padding: 10rem / $pxConvertRem 20rem / $pxConvertRem;
  62 + margin-right: 15rem / $pxConvertRem;
  63 + margin-bottom: 15rem / $pxConvertRem;
  64 + border: 1px solid #c9c9c9;
  65 + color: #676767;
  66 + font-size: 26rem / $pxConvertRem;
  67 + }
  68 +
  69 + .goods {
  70 + margin-right: -20rem / $pxConvertRem;
  71 + }
  72 +
  73 + .sale-invoice {
  74 + margin-top: -20rem / $pxConvertRem;
  75 + font-size: 24rem / $pxConvertRem;
  76 +
  77 + li {
  78 + height: 90rem / $pxConvertRem;
  79 + line-height: 90rem / $pxConvertRem;
  80 + border-bottom: 1px solid #f7f7f7;
  81 + }
  82 +
  83 + .coupon-count {
  84 + padding: 5rem / $pxConvertRem;
  85 + background: #f00;
  86 + color: #fff;
  87 + @include border-radius(10px);
  88 + margin-left: 20rem / $pxConvertRem;
  89 + }
  90 +
  91 + .coupon-use,
  92 + .coin-check {
  93 + float: right;
  94 + color: #999;
  95 + }
  96 +
  97 + .coin-check {
  98 + float: right;
  99 + color: #999;
  100 +
  101 + .checkbox {
  102 + margin-left: 5rem / $pxConvertRem;
  103 + color: #000;
  104 + }
  105 +
  106 + }
  107 +
  108 + .checkbox.icon-checkbox {
  109 + color: #999;
  110 + }
  111 +
  112 + .invoice .checkbox {
  113 + float: right;
  114 + }
  115 +
  116 + .desc {
  117 + color: #999;
  118 + }
  119 + }
  120 +
  121 + .total {
  122 + font-size: 22rem / $pxConvertRem;
  123 + margin-top: 20rem / $pxConvertRem;
  124 +
  125 + span {
  126 + display: inline-block;
  127 + width: 130rem / $pxConvertRem;
  128 + }
  129 + }
  130 +
  131 + .cost {
  132 + border-top: 1px solid #f7f7f7;
  133 + line-height: 100rem / $pxConvertRem;
  134 + margin-top: 10rem / $pxConvertRem;
  135 + font-size: 34rem / $pxConvertRem;
  136 +
  137 + em {
  138 + color: #f00;
  139 + }
  140 + }
  141 +
  142 + .pay-mode {
  143 + background: #fff;
  144 + padding: 0 20rem / $pxConvertRem;
  145 + margin-top: -22rem / $pxConvertRem;
  146 +
  147 + li {
  148 + height: 88rem / $pxConvertRem;
  149 + line-height: 88rem / $pxConvertRem;
  150 + margin-bottom: 28rem / $pxConvertRem;
  151 + @include border-radius(5px);
  152 + font-size: 32rem / $pxConvertRem;
  153 + color: #fff;
  154 + text-align: center;
  155 + }
  156 +
  157 + .cod {
  158 + background: #000;
  159 + }
  160 +
  161 + .pay-online {
  162 + background: #57b038;
  163 + }
  164 + }
  165 +}
  1 +{{> layout/header}}
  2 +<div class="yoho-coin-page yoho-page">
  3 + {{# yohoCoin}}
  4 + <p class="coin-num">
  5 + <em>{{coinNum}}</em>
  6 + YOHO币
  7 + </p>
  8 +
  9 + <section>
  10 + <p class="title">YOHO币</p>
  11 + <hr>
  12 + <p>
  13 + <span class="sub-title">YOHO币是什么,有什么用?</span>
  14 + YOHO币是有货商城的虚拟货币,与现金比例1:1,没有任何使用期限,YOHO币可直接用于有货线上购物使用,不可转让他人,不可兑换为现金。使用YOHO币支付的金额不可计入消费金额。
  15 + </p>
  16 + <p>
  17 + <span class="sub-title">如何查看自己的YOHO币?</span>
  18 + <span class="path">登录 > 个人中心 > 我的YOHO币</span>
  19 + </p>
  20 + <p>
  21 + <span class="sub-title">YOHO币如何购买支付?</span>
  22 + 在购买支付页面输入您要使用的YOHO币金额即可完成支付
  23 +
  24 + <div class="remark">
  25 + <span>※ </span>
  26 + 如果超过了我们约定的期限的非正常退货,我们将会于您的退款金额中直接扣除赠送YOHO币等值的金额。赠送给您的YOHO币还将保留在您的账户中,敬请谅解。
  27 + </div>
  28 + </p>
  29 + </section>
  30 + {{/ yohoCoin}}
  31 +</div>
  32 +{{> layout/footer}}
1 -{{> layout/header}}  
2 -<div class="yoho-coin-page yoho-page">  
3 - {{# yohoCoin}}  
4 - <p class="coin-num">  
5 - <em>{{coinNum}}</em>  
6 - YOHO币  
7 - </p>  
8 -  
9 - <section>  
10 - <p class="title">YOHO币</p>  
11 - <hr>  
12 - <p>  
13 - <span class="sub-title">YOHO币是什么,有什么用?</span>  
14 - YOHO币是有货商城的虚拟货币,与现金比例1:1,没有任何使用期限,YOHO币可直接用于有货线上购物使用,不可转让他人,不可兑换为现金。使用YOHO币支付的金额不可计入消费金额。  
15 - </p>  
16 - <p>  
17 - <span class="sub-title">如何查看自己的YOHO币?</span>  
18 - <span class="path">登录 > 个人中心 > 我的YOHO币</span>  
19 - </p>  
20 - <p>  
21 - <span class="sub-title">YOHO币如何购买支付?</span>  
22 - 在购买支付页面输入您要使用的YOHO币金额即可完成支付  
23 -  
24 - <div class="remark">  
25 - <span>※ </span>  
26 - 如果超过了我们约定的期限的非正常退货,我们将会于您的退款金额中直接扣除赠送YOHO币等值的金额。赠送给您的YOHO币还将保留在您的账户中,敬请谅解。  
27 - </div>  
28 - </p>  
29 - </section>  
30 - {{/ yohoCoin}}  
31 -</div>  
32 -{{> layout/footer}}  
  1 +{{> layout/header}}
  2 +<div class="order-ensure-page yoho-page">
  3 + {{# orderEnsure}}
  4 + <a class="address-wrap block">
  5 + <p class="infos">
  6 + 收货地址
  7 + <span class="per-info">{{name}} {{phoneNum}}</span>
  8 + <span class="address">{{address}}</span>
  9 + </p>
  10 + <span class="iconfont">&#xe614;</span>
  11 + </a>
  12 +
  13 + <section class="dispatch block">
  14 + <div class="sub-block">
  15 + <h3 class="title">配送方式</h3>
  16 + <ul class="dispatch-mode clearfix">
  17 + {{#each dispatchMode}}
  18 + <li data-id="{{id}}">{{name}}</li>
  19 + {{/each}}
  20 + </ul>
  21 + </div>
  22 +
  23 + <div class="sub-block">
  24 + <h3 class="title">送货时间</h3>
  25 + <ul class="dispatch-time clearfix">
  26 + {{#each dispatchTime}}
  27 + <li data-id="{{id}}">{{name}}</li>
  28 + {{/each}}
  29 + </ul>
  30 + </div>
  31 + </section>
  32 +
  33 + <section class="block">
  34 + <h3 class="title">商品</h3>
  35 + <div class="goods">
  36 + {{#each goods}}
  37 + {{> me/order/good}}
  38 + {{/each}}
  39 + </div>
  40 + </section>
  41 +
  42 + <section class="block">
  43 + <ul class="sale-invoice">
  44 + {{# coupon}}
  45 + <li class="coupon">
  46 + <a href="{{url}}">
  47 + <span class="title">优惠券</span>
  48 + {{#if count}}
  49 + <span class="coupon-count">
  50 + {{count}}张可用
  51 + </span>
  52 + {{/if}}
  53 +
  54 + {{#if notUsed}}
  55 + <span class="not-used coupon-use">
  56 + 未使用
  57 + <i class="iconfont">&#xe614;</i>
  58 + </span>
  59 + {{^}}
  60 + <span class="used coupon-use">
  61 + {{value}}
  62 + <i class="iconfont">&#xe614;</i>
  63 + </span>
  64 + {{/if}}
  65 + </a>
  66 + </li>
  67 + {{/ coupon}}
  68 +
  69 + {{# yohoCoin}}
  70 + <li class="coin">
  71 + <span class="title">YOHO币</span>
  72 + <span class="desc">可抵用¥{{.}}</span>
  73 + <span class="coin-check">
  74 + <em>- ¥ {{.}}</em>
  75 + <i class="iconfont checkbox icon-cb-checked"></i>
  76 + </span>
  77 + </li>
  78 + {{/ yohoCoin}}
  79 +
  80 + {{# invoice}}
  81 + <li class="invoice">
  82 + <span class="title">发票</span>
  83 + <span class="iconfont checkbox icon-checkbox"></span>
  84 + </li>
  85 + {{/ invoice}}
  86 + </ul>
  87 +
  88 + <ul class="total">
  89 + <li>
  90 + <span>总价</span>
  91 + &nbsp;&nbsp;¥ {{sumPrice}}
  92 + </li>
  93 + <li>
  94 + <span>活动价</span>
  95 + - ¥ {{salePrice}}
  96 + </li>
  97 + <li>
  98 + <span>运费</span>
  99 + + ¥ {{freight}}
  100 + </li>
  101 + <li>
  102 + <span>YOHO币</span>
  103 + - ¥ {{yohoCoin}}
  104 + </li>
  105 + <li class="cost">
  106 + 应付金额: <em>¥{{price}}</em>
  107 + </li>
  108 + </ul>
  109 + </section>
  110 +
  111 + <ul class="pay-mode">
  112 + <li class="cod">
  113 + <span class="iconfont"></span>
  114 + 货到付款
  115 + </li>
  116 + <li class="pay-online">
  117 + <span class="iconfont"></span>
  118 + 在线支付
  119 + </li>
  120 + </ul>
  121 + {{/ orderEnsure}}
  122 +</div>
  123 +{{> layout/footer}}
@@ -158,7 +158,6 @@ class HomeController extends AbstractAction @@ -158,7 +158,6 @@ class HomeController extends AbstractAction
158 $favBrands = \Index\UserModel::getFavBrandData($uid, $gender); 158 $favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
159 159
160 print_r($favBrands); 160 print_r($favBrands);
161 -  
162 } 161 }
163 162
164 /** 163 /**
@@ -187,7 +186,7 @@ class HomeController extends AbstractAction @@ -187,7 +186,7 @@ class HomeController extends AbstractAction
187 186
188 print_r($favBrands); 187 print_r($favBrands);
189 188
190 - $this->_view->display('yoho-coin', array('yohoCoin' => array('coinNum' => 0))); 189 + $this->_view->display('currency', array('yohoCoin' => array('coinNum' => 0)));
191 } 190 }
192 191
193 /** 192 /**
@@ -51,22 +51,89 @@ class ShoppingCartController extends AbstractAction @@ -51,22 +51,89 @@ class ShoppingCartController extends AbstractAction
51 ) 51 )
52 ); 52 );
53 53
54 - // $data = array(  
55 - // 'gift' => array(  
56 - // 'id' => 1,  
57 - // 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/09/17/03/014cacfa5c458b9732c68adf1af15d7a45.jpg?imageMogr2/thumbnail/120x120/extent/120x120/background/d2hpdGU=/position/center/quality/90',  
58 - // 'name' => 'Life.After.Life纯棉短袜',  
59 - // 'color' => '黄色',  
60 - // 'size' => 'L',  
61 - // 'price' => 0,  
62 - // 'count' => 1  
63 - // )  
64 - // ); 54 + $data = array(
  55 + 'gift' => array(
  56 + 'id' => 1,
  57 + 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/09/17/03/014cacfa5c458b9732c68adf1af15d7a45.jpg?imageMogr2/thumbnail/120x120/extent/120x120/background/d2hpdGU=/position/center/quality/90',
  58 + 'name' => 'Life.After.Life纯棉短袜',
  59 + 'color' => '黄色',
  60 + 'size' => 'L',
  61 + 'price' => 0,
  62 + 'count' => 1
  63 + )
  64 + );
65 65
66 $this->_view->display('gift-advance', array('giftAdvancePage' => true, 'pageHeader' => array( 66 $this->_view->display('gift-advance', array('giftAdvancePage' => true, 'pageHeader' => array(
67 'navBack' => true, 'navTitle' => '加价购'), 'shoppingCart' => $data)); 67 'navBack' => true, 'navTitle' => '加价购'), 'shoppingCart' => $data));
68 } 68 }
69 69
  70 + public function orderEnsureAction() {
  71 + $data = array(
  72 + 'orderEnsure' => array(
  73 + 'name' => '申建军',
  74 + 'phoneNum' => '12345678',
  75 + 'address' => '江苏省南京市建邺区',
  76 + 'dispatchMode' => array(
  77 + array(
  78 + 'id' => 1,
  79 + 'name' => '普通快递¥10'
  80 + ),
  81 + array(
  82 + 'id' => 2,
  83 + 'name' => '顺丰速运¥15(仅支持顺丰克配送的地区)'
  84 + )
  85 + ),
  86 + 'dispatchTime' => array(
  87 + array(
  88 + 'id' => 1,
  89 + 'name' => '工作日、双休日、节假日均可送货'
  90 + ),
  91 + array(
  92 + 'id' => 2,
  93 + 'name' => '只工作日送货'
  94 + ),
  95 + array(
  96 + 'id' => 3,
  97 + 'name' => '只双休日、节假日送货'
  98 + )
  99 + ),
  100 + 'goods' => array(
  101 + array(
  102 + 'id' => 1,
  103 + 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
  104 + 'name' => 'Adidas Originals ZX FLUXM22508',
  105 + 'color' => '黄',
  106 + 'size' => '43',
  107 + 'price' => '699.00',
  108 + 'count' => '2'
  109 + ),
  110 + array(
  111 + 'id' => 1,
  112 + 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/11/04/05/0188f1aca49ac478a565ec029b5d2d4a6c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
  113 + 'name' => 'B.Duck浴室玩伴mini浮水鸭',
  114 + 'gift' => true,
  115 + 'color' => '黄',
  116 + 'size' => '43',
  117 + 'price' => '0.00',
  118 + 'count' => '1'
  119 + )
  120 + ),
  121 + 'coupon' => array(
  122 + 'count' => 1,
  123 + 'notUsed' => true
  124 + ),
  125 + 'yohoCoin' => '0',
  126 + 'invoice' => true,
  127 + 'sumPrice' => 900,
  128 + 'salePrice' => 90,
  129 + 'freight' => 0,
  130 + 'price' => 810
  131 + )
  132 + );
  133 +
  134 + $this->_view->display('order-ensure', $data);
  135 + }
  136 +
70 /** 137 /**
71 * 读取chose-panel内容 138 * 读取chose-panel内容
72 */ 139 */