Authored by biao

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

@@ -273,9 +273,14 @@ const filterCartData = (result, uid) => { @@ -273,9 +273,14 @@ const filterCartData = (result, uid) => {
273 if (result.data && result.data.ordinary_cart_data) { 273 if (result.data && result.data.ordinary_cart_data) {
274 ordinaryCartData = result.data.ordinary_cart_data; 274 ordinaryCartData = result.data.ordinary_cart_data;
275 totalOrdinaryMoney = ordinaryCartData.shopping_cart_data.last_order_amount; 275 totalOrdinaryMoney = ordinaryCartData.shopping_cart_data.last_order_amount;
276 - ordinaryGoods = _.concat(ordinaryGoods, ordinaryCartData.goods_list);  
277 - invalidGoods = _.concat(invalidGoods, ordinaryCartData.off_shelves_goods_list);  
278 - ordinarySoldOutGoods = _.concat(ordinarySoldOutGoods, ordinaryCartData.sold_out_goods_list); 276 +
  277 + ordinarySoldOutGoods = ordinaryCartData.sold_out_goods_list; // 库存不足商品
  278 +
  279 + let soldOutWithoutStorage = _.filter(ordinarySoldOutGoods, {storage_number: '0'}); // 库存为0的商品失效
  280 + let soldOutWithStorage = _.reject(ordinarySoldOutGoods, {storage_number: '0'}); // 库存不为0的商品归为普通商品并显示库存不足
  281 +
  282 + ordinaryGoods = _.concat(ordinaryGoods, ordinaryCartData.goods_list, soldOutWithStorage); // 正常商品
  283 + invalidGoods = _.concat(invalidGoods, ordinaryCartData.off_shelves_goods_list, soldOutWithoutStorage); // 失效商品
279 284
280 _.forEach(ordinaryGoods, function(good) { 285 _.forEach(ordinaryGoods, function(good) {
281 buyNumber = parseInt(good.buy_number, 10); 286 buyNumber = parseInt(good.buy_number, 10);
@@ -299,8 +304,7 @@ const filterCartData = (result, uid) => { @@ -299,8 +304,7 @@ const filterCartData = (result, uid) => {
299 hasGoods: advancedGoods.length || ordinaryGoods.length || invalidGoods.length, 304 hasGoods: advancedGoods.length || ordinaryGoods.length || invalidGoods.length,
300 preSalePros: (advancedSoldOutGoods.length || advancedGoods.length) ? 305 preSalePros: (advancedSoldOutGoods.length || advancedGoods.length) ?
301 _.concat(advancedGoods, advancedSoldOutGoods) : [], 306 _.concat(advancedGoods, advancedSoldOutGoods) : [],
302 - commonPros: (ordinarySoldOutGoods.length || ordinaryGoods.length) ?  
303 - _.concat(ordinaryGoods, ordinarySoldOutGoods) : [], 307 + commonPros: ordinaryGoods,
304 invalidPros: invalidGoods, 308 invalidPros: invalidGoods,
305 selectedNum: selectedAdvanceNum + selectedOrdinaryNum, 309 selectedNum: selectedAdvanceNum + selectedOrdinaryNum,
306 checkAll: totalNum === (selectedAdvanceNum + selectedOrdinaryNum), 310 checkAll: totalNum === (selectedAdvanceNum + selectedOrdinaryNum),
1 -{{> sign-header}}  
2 -<div class="pay-success-page blk-page">  
3 - <div class="center-content">  
4 - {{# content}}  
5 - <div class="order-info clearfix">  
6 - <div class="left">  
7 - <p class="success-tip">恭喜您,购买完成!您已成功支付{{round cost 2}}元!</p>  
8 - <p class="order-num">订单编号:{{orderNum}}</p>  
9 - <p class="payment-online">在线支付:¥{{round onlineCost 2}}</p>  
10 - </div>  
11 -  
12 - <div class="btns right">  
13 - <a class="btn go-check-order" href="{{orderHref}}">查看订单详情</a>  
14 - <a class="btn" href="{{walkHref}}">继续逛逛</a>  
15 - </div>  
16 - </div>  
17 -  
18 - <div class="tip-info">  
19 - <p class="title">温馨提示:</p>  
20 - <p>  
21 - 1.每天15:00以前成功支付的订单将在当天发货,15:00-00:00成功付款的订单将在第二天发货。  
22 - 2.当订单发货后,您可以登录<a class="blue" href="/me/order">订单中心</a>查询快递发货详情。  
23 - 3.YOHO!BLK有货支持“开箱验货”和“15天退换货保障”收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,  
24 - <a class="blue" href="/help?id=43">“退换货政策”</a>请点击查看。<em class="blue">4.尊敬的用户:近期为网络诈骗高发期,YOHO!BLK有货郑重声明,不会以任何形式索取客户的账户信息或引导转账,敬请提高警惕,谨防诈骗</em>  
25 - </p>  
26 - </div>  
27 - {{/ content}}  
28 - </div> 1 +{{> sign-header}}
  2 +<div class="pay-success-page blk-page">
  3 + <div class="center-content">
  4 + {{# content}}
  5 + <div class="order-info clearfix">
  6 + <div class="left">
  7 + <p class="success-tip">
  8 + 恭喜您,购买完成!您已成功支付
  9 + {{#if cost}}
  10 + {{round cost 2}}
  11 +
  12 + {{#if coin}}
  13 + ,有货币{{coin}}
  14 + {{/if}}
  15 + {{^}}
  16 + 有货币{{coin}}
  17 + {{/if}}
  18 +
  19 + </p>
  20 + <p class="order-num">订单编号:{{orderNum}}</p>
  21 + {{#if onlineCost}}
  22 + <p class="payment-online">在线支付:¥{{round onlineCost 2}}</p>
  23 + {{/if}}
  24 + {{#if coin}}
  25 + <p class="payment-coin">有货币支付:{{coin}}</p>
  26 + {{/if}}
  27 + </div>
  28 +
  29 + <div class="btns right">
  30 + <a class="btn go-check-order" href="{{orderHref}}">查看订单详情</a>
  31 + <a class="btn" href="{{walkHref}}">继续逛逛</a>
  32 + </div>
  33 + </div>
  34 +
  35 + <div class="tip-info">
  36 + <p class="title">温馨提示:</p>
  37 + <p>
  38 + 1.每天15:00以前成功支付的订单将在当天发货,15:00-00:00成功付款的订单将在第二天发货。
  39 + 2.当订单发货后,您可以登录<a class="blue" href="/me/order">订单中心</a>查询快递发货详情。
  40 + 3.YOHO!BLK有货支持“开箱验货”和“15天退换货保障”收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,
  41 + <a class="blue" href="/help?id=43">“退换货政策”</a>请点击查看。<em class="blue">4.尊敬的用户:近期为网络诈骗高发期,YOHO!BLK有货郑重声明,不会以任何形式索取客户的账户信息或引导转账,敬请提高警惕,谨防诈骗</em>
  42 + </p>
  43 + </div>
  44 + {{/ content}}
  45 + </div>
29 </div> 46 </div>
@@ -118,33 +118,33 @@ @@ -118,33 +118,33 @@
118 <li class="chk" data-product_info='{"goods_type": "invalid", "buy_number": {{buy_number}}, "selected": "{{selected}}", "product_sku": "{{product_sku}}", "promotion_id": 0}'> 118 <li class="chk" data-product_info='{"goods_type": "invalid", "buy_number": {{buy_number}}, "selected": "{{selected}}", "product_sku": "{{product_sku}}", "promotion_id": 0}'>
119 <span class="iconfont warning">&#xe625;</span> 119 <span class="iconfont warning">&#xe625;</span>
120 </li> 120 </li>
121 - <li>  
122 - <a href="javascript:void(0)">  
123 - <img src="{{image goods_images 100 134}}" alt="{{product_name}}">  
124 - </a>  
125 - </li>  
126 - <li class="pro-info">  
127 - <div class="pro-name"><a href="javascript:void(0)">{{product_name}}</a></div>  
128 - <div>  
129 - {{#if color_name}}  
130 - <span class="mr20">颜色: {{color_name}}</span>  
131 - {{/if}}  
132 - {{#if size_name}}  
133 - <span>尺寸: {{size_name}}</span>  
134 - {{/if}}  
135 - </div>  
136 - </li>  
137 - <li class="price-num">  
138 - <span class="price sale-price">¥ {{round sales_price 2}}</span>  
139 - {{> cart/stepper }}  
140 - </li>  
141 - <li class="total-price-action">  
142 - <span class="price item-total-price">¥ {{round (multiple sales_price buy_number) 2}}</span>  
143 - <div class="actions">  
144 - <div class="remove-item action" data-product_id={{product_id}}><span class="iconfont">&#xe614;</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>  
145 - <div class="send-to-favorite action" data-product_id={{product_id}}>移入收藏夹</div>  
146 - </div>  
147 - </li> 121 + <li>
  122 + <a href="javascript:void(0)">
  123 + <img src="{{image goods_images 100 134}}" alt="{{product_name}}">
  124 + </a>
  125 + </li>
  126 + <li class="pro-info">
  127 + <div class="pro-name"><a href="javascript:void(0)">{{product_name}}</a></div>
  128 + <div>
  129 + {{#if color_name}}
  130 + <span class="mr20">颜色: {{color_name}}</span>
  131 + {{/if}}
  132 + {{#if size_name}}
  133 + <span>尺寸: {{size_name}}</span>
  134 + {{/if}}
  135 + </div>
  136 + </li>
  137 + <li class="price-num">
  138 + <span class="price sale-price">¥ {{round sales_price 2}}</span>
  139 + {{> cart/stepper }}
  140 + </li>
  141 + <li class="total-price-action">
  142 + <span class="price item-total-price">¥ {{round (multiple sales_price buy_number) 2}}</span>
  143 + <div class="actions">
  144 + <div class="remove-item action" data-product_id={{product_id}}><span class="iconfont">&#xe614;</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
  145 + <div class="send-to-favorite action" data-product_id={{product_id}}>移入收藏夹</div>
  146 + </div>
  147 + </li>
148 </ul> 148 </ul>
149 {{/each}} 149 {{/each}}
150 </div> 150 </div>
@@ -9,6 +9,9 @@ var $cate = $('.cateId-' + queryId);// 当前分类 @@ -9,6 +9,9 @@ var $cate = $('.cateId-' + queryId);// 当前分类
9 var $subsets = $('.subsets'); 9 var $subsets = $('.subsets');
10 var parentID = queryId.substr(0, 1);// 一级分类id 10 var parentID = queryId.substr(0, 1);// 一级分类id
11 11
  12 +require('../common/header');
  13 +require('../common/return-top');
  14 +
12 /** 15 /**
13 * 目录切换 16 * 目录切换
14 */ 17 */
1 -.pay-success-page {  
2 -  
3 - .order-info {  
4 - margin-top: 40px;  
5 - padding-bottom: 30px;  
6 - }  
7 -  
8 - .success-tip {  
9 - font-size: 18px;  
10 - font-weight: bold;  
11 - margin-bottom: 30px;  
12 - }  
13 -  
14 - .order-num,  
15 - .payment-online {  
16 - font-size: 16px;  
17 - font-weight: bold;  
18 - line-height: 26px;  
19 - }  
20 -  
21 - .btns .btn {  
22 - width: 160px;  
23 - height: 40px;  
24 - line-height: 40px;  
25 - }  
26 -  
27 - .go-check-order {  
28 - margin-bottom: 20px;  
29 - }  
30 -  
31 - .tip-info {  
32 - border-top: 1px solid #eee;  
33 - font-size: 14px;  
34 - color: #666;  
35 - line-height: 20px;  
36 - margin-bottom: 40px;  
37 -  
38 - .title {  
39 - line-height: 50px;  
40 - color: #000;  
41 - font-weight: bold;  
42 - }  
43 - }  
44 -} 1 +.pay-success-page {
  2 +
  3 + .order-info {
  4 + margin-top: 40px;
  5 + padding-bottom: 30px;
  6 + }
  7 +
  8 + .success-tip {
  9 + font-size: 18px;
  10 + font-weight: bold;
  11 + margin-bottom: 30px;
  12 + }
  13 +
  14 + .order-num,
  15 + .payment-online,
  16 + .payment-coin {
  17 + font-size: 16px;
  18 + font-weight: bold;
  19 + line-height: 26px;
  20 + }
  21 +
  22 + .btns .btn {
  23 + width: 160px;
  24 + height: 40px;
  25 + line-height: 40px;
  26 + }
  27 +
  28 + .go-check-order {
  29 + margin-bottom: 20px;
  30 + }
  31 +
  32 + .tip-info {
  33 + border-top: 1px solid #eee;
  34 + font-size: 14px;
  35 + color: #666;
  36 + line-height: 20px;
  37 + margin-bottom: 40px;
  38 +
  39 + .title {
  40 + line-height: 50px;
  41 + color: #000;
  42 + font-weight: bold;
  43 + }
  44 + }
  45 +}