Authored by 郭成尧

jit-bug-fixed

... ... @@ -2,8 +2,6 @@
{{#each packages}}
<div class="top">
{{packageType}}
<!-- <span class="package-type">包裹{{packageType}}:</span>-->
<!-- <span class="package-title">{{dispatchType}}</span>-->
</div>
<div class="middle">
<div class="swiper-container">
... ...
... ... @@ -9,8 +9,7 @@
.top,
.bottom {
height: 88px;
line-height: 88px;
line-height: 40px;
color: #444;
padding: 0 20px;
}
... ... @@ -18,9 +17,6 @@
.top {
margin-bottom: 1PX;
font-size: 26px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.bottom {
... ...
... ... @@ -379,38 +379,31 @@ function transformJit(packageList) {
};
_.forEach(packageList, (pValue, pKey) => {
result.packages[pKey] = {
packageType: (pKey + 1) + ':' + pValue.title
let perPackageData = {
packageType: (pKey + 1) + ':' + pValue.title,
goods: []
};
_.forEach(pValue.goods_list, (gValue, gKey) => {
result.packages[pKey].goods = [];
result.packages[pKey].goods[gKey] = {
thumb: gValue.goods_images
};
switch (gValue.goods_type) {
case 'price_gift' :
// 加价购
result.packages[pKey].goods[gKey].isAdd = true;
break;
case 'gift' :
// 赠品
result.packages[pKey].goods[gKey].isGift = true;
break;
default:
break;
}
});
if (pValue.shopping_cost !== '0.00') {
result.packages[pKey].expressCost = pValue.shopping_cost;
perPackageData.push({
expressCost: pValue.shopping_cost
});
}
if (pValue.shopping_cut_cost !== '0.00') {
result.packages[pKey].discount = pValue.shopping_cut_cost;
perPackageData.push({
discount: pValue.shopping_cut_cost
});
}
result.packages.push(perPackageData);
_.forEach(pValue.goods_list, gValue => {
result.packages[pKey].goods.push({
thumb: gValue.goods_images,
isAdd: gValue.goods_type === 'price_gift',
isGift: gValue.goods_type === 'gift'
});
});
});
return result;
}
... ...