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) => {
if (result.data && result.data.ordinary_cart_data) {
ordinaryCartData = result.data.ordinary_cart_data;
totalOrdinaryMoney = ordinaryCartData.shopping_cart_data.last_order_amount;
ordinaryGoods = _.concat(ordinaryGoods, ordinaryCartData.goods_list);
invalidGoods = _.concat(invalidGoods, ordinaryCartData.off_shelves_goods_list);
ordinarySoldOutGoods = _.concat(ordinarySoldOutGoods, ordinaryCartData.sold_out_goods_list);
ordinarySoldOutGoods = ordinaryCartData.sold_out_goods_list; // 库存不足商品
let soldOutWithoutStorage = _.filter(ordinarySoldOutGoods, {storage_number: '0'}); // 库存为0的商品失效
let soldOutWithStorage = _.reject(ordinarySoldOutGoods, {storage_number: '0'}); // 库存不为0的商品归为普通商品并显示库存不足
ordinaryGoods = _.concat(ordinaryGoods, ordinaryCartData.goods_list, soldOutWithStorage); // 正常商品
invalidGoods = _.concat(invalidGoods, ordinaryCartData.off_shelves_goods_list, soldOutWithoutStorage); // 失效商品
_.forEach(ordinaryGoods, function(good) {
buyNumber = parseInt(good.buy_number, 10);
... ... @@ -299,8 +304,7 @@ const filterCartData = (result, uid) => {
hasGoods: advancedGoods.length || ordinaryGoods.length || invalidGoods.length,
preSalePros: (advancedSoldOutGoods.length || advancedGoods.length) ?
_.concat(advancedGoods, advancedSoldOutGoods) : [],
commonPros: (ordinarySoldOutGoods.length || ordinaryGoods.length) ?
_.concat(ordinaryGoods, ordinarySoldOutGoods) : [],
commonPros: ordinaryGoods,
invalidPros: invalidGoods,
selectedNum: selectedAdvanceNum + selectedOrdinaryNum,
checkAll: totalNum === (selectedAdvanceNum + selectedOrdinaryNum),
... ...
... ... @@ -4,9 +4,26 @@
{{# content}}
<div class="order-info clearfix">
<div class="left">
<p class="success-tip">恭喜您,购买完成!您已成功支付{{round cost 2}}元!</p>
<p class="success-tip">
恭喜您,购买完成!您已成功支付
{{#if cost}}
{{round cost 2}}
{{#if coin}}
,有货币{{coin}}
{{/if}}
{{^}}
有货币{{coin}}
{{/if}}
</p>
<p class="order-num">订单编号:{{orderNum}}</p>
{{#if onlineCost}}
<p class="payment-online">在线支付:¥{{round onlineCost 2}}</p>
{{/if}}
{{#if coin}}
<p class="payment-coin">有货币支付:{{coin}}</p>
{{/if}}
</div>
<div class="btns right">
... ...
... ... @@ -9,6 +9,9 @@ var $cate = $('.cateId-' + queryId);// 当前分类
var $subsets = $('.subsets');
var parentID = queryId.substr(0, 1);// 一级分类id
require('../common/header');
require('../common/return-top');
/**
* 目录切换
*/
... ...
... ... @@ -12,7 +12,8 @@
}
.order-num,
.payment-online {
.payment-online,
.payment-coin {
font-size: 16px;
font-weight: bold;
line-height: 26px;
... ...