Authored by 陈峰

购物车免运费提示

... ... @@ -10,13 +10,13 @@ const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
const domains = {
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
// api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
api: 'http://dev-api.yohops.com:9999/',
service: 'http://dev-service.yohops.com:9999/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
... ...
... ... @@ -26,6 +26,11 @@
{{#if ordinaryCart}}
<div class="cart-content normal-good active">
{{#commonCart}}
{{#if shipCost.shippingTip}}
<div class="tips">
{{shipCost.shippingTip}}
</div>
{{/if}}
{{> cart-content}}
{{/commonCart}}
</div>
... ...
... ... @@ -10,6 +10,17 @@
display: block;
}
.tips {
margin-top: -20px;
height: 54px;
line-height: 54px;
font-size: 25px;
background: #f0f0f0;
color: #b7b7b7;
padding-left: 30px;
padding-right: 30px;
}
.presell-info {
margin-top: -20px;
height: 105px;
... ...
... ... @@ -312,6 +312,10 @@ const procCartData = (data, isAdvanceCart) => {
return {id: promotion.promotion_id, name: promotion.promotion_title};
});
}
result.shipCost = {
isFree: _.get(data, 'shipping_cost_prompt.is_shipping_cost_free', 'N'),
shippingTip: _.get(data, 'shipping_cost_prompt.shipping_cost_tips', '')
};
// 计算正常商品且有库存的总数
let goodCount = _.sum(result.goods
... ...