Authored by 刘传洋

Merge branch 'feature/shoppingCart' of http://git.yoho.cn/fe/yohobuy-node into feature/shoppingCart

... ... @@ -393,18 +393,34 @@ const formatPromotion = (it, selectedGiftsList) => {
// 判断赠品/加价购商品,是否被选中
info.giftGoodsList = checkGoodsIsSel(info.giftGoodsList, info.promotionId, selectedGiftsList);
function toDecimal(x) {
var f = Math.round(x * 100) / 100;
var s = f.toString();
var rs = s.indexOf('.');
if (rs < 0) {
rs = s.length;
s += '.';
}
while (s.length <= rs + 2) {
s += '0';
}
return s;
}
if (status === 0) {
let tipTxt = `差${ -Math.round(info.conditionValue * 100) / 100}`;
console.log(toDecimal(info.conditionValue));
let tipTxt = `还差${ -(Math.round(parseFloat(info.conditionValue) * 100) / 100)}`;
if (info.conditionUnit === 1) {
tipTxt += '件满足 ';
tipTxt += '件满足';
} else if (info.conditionUnit === 2) {
tipTxt += '元满足 ';
tipTxt += '元满足';
}
info.promotionTitle = tipTxt + info.promotionTitle;
info.promotionTitle = tipTxt + '(' + info.promotionTitle + ')';
} else if (status === 10) {
info.promotionTitle = '已满足' + info.promotionTitle;
info.promotionTitle = '已满足' + '(' + info.promotionTitle + ')';
}
if (info.giftGoodsList) {
... ...
... ... @@ -44,7 +44,7 @@
</span>
</em>
{{#and isAdvance preSellDate}}
<span class="presell">上市期{{preSellDate}}</span>
<span class="presell">上市期:{{preSellDate}}</span>
{{/and}}
</p>
</div>
... ...
... ... @@ -193,7 +193,7 @@
<a href="javascript:void(0);" class="btn_h"
style="display:none;"><span>清空商品</span></a>
<i class="cart-item-check iconfont" id="cbSelAllGoods"></i>
<span>全选</span>
<span class="check-all-sum">全选</span>
<a class="delAll delete-all-sel" href="javascript:void(0);">删除选中商品</a>
<a class="removeAll remove-all-2fav" href="javascript:void(0);">移入收藏夹</a>
<a class="emptyDisabled clean-all-disable"
... ... @@ -205,10 +205,10 @@
{{#if gainYohoCoin}}
<a href="/help/?category_id=87" class="yoho-coin" target="_blank"></a>
共返有货币:{{gainYohoCoin}}&#12288;&#12288;{{/if}}
已选商品<strong class="ins">{{selectedGoodsCount}}</strong>&#12288;&#12288;
已选商品<strong class="ins">{{selectedGoodsCount}}</strong>&#12288;&#12288;
商品金额:<b>¥&nbsp;{{orderAmount}}</b>
</p>
{{#if discountAmount}}<p>活动优惠:<b>&nbsp;{{discountAmount}}</b></p>{{/if}}
{{#if discountAmount}}<p>活动优惠:<b>-&nbsp;¥&nbsp;{{discountAmount}}</b></p>{{/if}}
<!--<p>优惠码/优惠券:<b>¥&nbsp;8888.00</b></p>-->
<p class="sum">
应付金额(不含邮费):<strong><kbd>¥&nbsp;</kbd>{{lastOrderAmount}}</strong></p>
... ...
... ... @@ -80,7 +80,7 @@
}
.blue {
color: #0883d1 !important;
color: #017cf8 !important;
}
.mt20 {
... ... @@ -131,6 +131,7 @@
line-height: 30px;
border:1px solid #ccc;
font-size: 12px;
font-weight: 300;
text-indent: 10px;
background: #fff;
span{
... ... @@ -164,6 +165,7 @@
.shopping-step {
width: 440px;
font-size: 15px;
font-weight: 300;
display: block;
border-top: 2px solid #b0b0b0;
position: absolute;
... ... @@ -260,6 +262,7 @@
background: #fff;
color: #818181;
font-size: 14px;
font-weight: 300;
height: 30px;
line-height: 30px;
padding-left: 30px;
... ... @@ -285,6 +288,7 @@
background-color: #ff575c;
color: #fff;
font-size: 12px;
font-weight: 300;
text-align: center;
&.order-pay-mark-white {
color: #ff575c;
... ... @@ -295,7 +299,9 @@
}
.gift-sell-info{
font-size: 14px;
font-weight:300;
color: #444;
text-align: left;
line-height: 1;
margin-bottom: 8px;
&:last-child {
... ... @@ -314,11 +320,12 @@
line-height: 20px;
padding: 0;
font-size: 14px;
font-weight: 300;
color: #000;
cursor: pointer;
outline: none;
&.blue {
color: #0883d1;
color: #017cf8;
}
}
}
... ... @@ -327,6 +334,7 @@
height: auto;
overflow: hidden;
font-size: 12px;
font-weight: 300;
margin-bottom: 10px;
.tipsbox {
position: relative;
... ... @@ -337,6 +345,7 @@
padding: 4px 0 4px 0;
color: #818181;
font-size: 14px;
font-weight: 300;
background-color: #f0f0f0;
.btn_close {
width: 13px;
... ... @@ -367,6 +376,7 @@
background-color: #ff575c;
color: #fff;
font-size: 12px;
font-weight: 300;
text-align: center;
vertical-align: top;
}
... ... @@ -393,10 +403,10 @@
height: 50px;
line-height: 50px;
font-size: 16px;
font-weight: 300;
color: #fff;
vertical-align: middle;
text-align: center;
font-weight: 400;
&.left {
text-align: left;
}
... ... @@ -556,6 +566,7 @@
float: left;
padding: 30px 0;
font-size: 15px;
font-weight: 300;
text-align:center;
}
}
... ... @@ -617,6 +628,7 @@
left: 21px;
display: inline-block;
font-size: 12px;
font-weight: 300;
color: #000;
background-color: #f0f0f0;
padding: 8px 10px;
... ... @@ -640,16 +652,17 @@
float: left;
text-align: left;
padding-left: 15px;
padding-top: 5px;
padding-top: 0;
margin-left: 0;
a {
display:block;
width:280px;
min-height: 36px;
min-height: 44px;
padding-left: 3px;
color: #444;
font-size: 15px;
line-height: 1.25;
font-weight: 300;
line-height: 1.5;
text-decoration: none;
text-align:left;
overflow: hidden;
... ... @@ -666,7 +679,7 @@
}
}
.pay-pro-detail{
margin-top: 4px;
margin-top: 0;
display:inline-block;
border: 1px dashed transparent;
box-sizing: border-box;
... ... @@ -692,6 +705,7 @@
display: inline-block;
padding-left: 3px;
font-size: 13px;
font-weight: 300;
color: #9a9a9a;
text-align: left;
b {
... ... @@ -703,10 +717,11 @@
text-overflow: ellipsis;
white-space: nowrap;
font-style: normal;
font-weight: 400;
font-weight: 300;
}
i {
font-size: 14px;
font-weight: 300;
margin-left: 40px;
display: inline-block;
width: 14px;
... ... @@ -722,6 +737,7 @@
margin-top: 5px;
padding-left: 3px;
font-size: 13px;
font-weight: 300;
height: 13px;
line-height: 13px;
color: #9a9a9a;
... ... @@ -825,6 +841,7 @@
padding-right: 6px;
height: 16px;
font-size: 12px;
font-weight: 300;
color: #000;
text-align: center;
line-height: 16px;
... ... @@ -855,6 +872,7 @@
float: left;
color: #000;
font-size: 13px;
font-weight: 300;
margin-right: 7px;
}
.dt {
... ... @@ -877,6 +895,7 @@
-webkit-border-radius: 0;
-moz-border-radius: 0;
font-size: 12px;
font-weight: 300;
padding: 0;
border: none;
line-height: 22px;
... ... @@ -900,6 +919,7 @@
.cart-del-btn,.cart-col-btn {
display: block;
font-size:12px;
font-weight: 300;
color:#000;
text-align:right;
cursor: pointer;
... ... @@ -944,6 +964,7 @@
height: 30px;
color: #444;
font-size: 15px;
font-weight: 300;
border: 1px solid #e0e0e0;
}
.cart-num-btn {
... ... @@ -955,12 +976,27 @@
cursor: pointer;
font-size: 14px;
box-sizing: border-box;
&:hover {
background-color: #e0e0e0;
.icon-minus,.icon-plus {
color: #666;
}
}
&.disabled {
&:hover {
.icon-minus,.icon-plus {
color: #f0f0f0;
}
}
}
}
.icon-minus {
font-size: 18px;
display: inline-block;
margin-top: 1px;
vertical-align: middle;
color: #b4b4b4;
color: #b0b0b0;
text-stroke-width: .5px;
-webkit-text-stroke-width: .5px;
&:before {
... ... @@ -971,14 +1007,14 @@
display: inline-block;
vertical-align: middle;
font-size: 17px;
color: #b4b4b4;
color: #b0b0b0;
&:before {
content:'\e644';
}
}
.disabled {
i {
color: rgba(180,180,180,.3);
color: #f0f0f0;
cursor: not-allowed;
}
}
... ... @@ -987,6 +1023,7 @@
.tip-message {
background: transparent;
font-size: 14px;
font-weight: 300;
margin-top: 5px;
color:#ff575c;
&.tip-message-coin {
... ... @@ -1024,6 +1061,7 @@
display: inline-block;
padding: 0 10px;
font-size: 12px;
font-weight: 300;
color: #000;
border: 1px solid #000;
background-color: #fff;
... ... @@ -1061,6 +1099,7 @@
width: 190px;
text-align: left;
font-size: 12px;
font-weight: 300;
color: #000;
text-align: justify;
padding: 0;
... ... @@ -1104,10 +1143,11 @@
height: 18px;
line-height: 18px;
font-size:12px;
font-weight: 300;
text-align: center;
color: #fff;
cursor: pointer;
background: #000100;
background: #3a3a3a;
color: #fff;
&.red {
background-color: #ff575c;
... ... @@ -1137,6 +1177,12 @@
height: auto;
overflow: hidden;
font-size: 14px;
font-weight: 300;
.check-all-sum {
font-size: 16px;
color: #444;
}
.cart-item-check {
margin-top:0;
... ... @@ -1146,7 +1192,7 @@
float: left;
a {
color: #0883d1;
color: #017cf8;
margin-left: 20px;
&:hover {
color: #d0021b;
... ... @@ -1162,11 +1208,18 @@
float: right;
text-align: right;
p {
height: 30px;
line-height: 30px;
}
strong {
color: #d0021b;
font-size: 18px;
font-size: 20px;
font-weight: 300;
&.ins {
font-size: 14px;
font-weight: 300;
width: initial;
font-weight: normal;
}
... ... @@ -1175,22 +1228,11 @@
b,strong{
display: inline-block;
font-style: normal;
width: 120px;
width: 110px;
text-align: right;
}
}
/*.sale-info-title {*/
/*position: absolute;*/
/*bottom: 15px;*/
/*&:nth-child(1) {*/
/*left: 50px;*/
/*}*/
/*&:nth-child(2) {*/
/*left: 178px;*/
/*}*/
/*}*/
.sum {
color: #333;
strong {
... ... @@ -1240,16 +1282,18 @@
display: inline-block;
margin-left: 30px;
font-size: 14px;
font-weight: 300;
color: #000;
}
.btn-account {
width: 160px;
width: 150px;
height: 50px;
padding: 0;
text-align: center;
border: 0;
line-height: 50px;
font-size: 16px;
font-size: 20px;
font-weight: 300;
color: #fff;
font-weight: bold;
display: inline-block;
... ... @@ -1278,6 +1322,7 @@
p {
margin-top: 40px;
font-size: 18px;
font-weight: 300;
color: #4d4d4d;
text-align: center;
}
... ... @@ -1288,6 +1333,7 @@
height: 34px;
line-height: 34px;
font-size: 15px;
font-weight: 300;
color:#000;
border: 1px solid #000;
box-sizing: border-box;
... ... @@ -1304,6 +1350,7 @@
height:14px;
color: #818181;
font-size: 14px;
font-weight: 300;
text-align: left;
}
li {
... ... @@ -1332,6 +1379,7 @@
}
.good-name {
font-size: 14px;
font-weight: 300;
color: #000;
text-align: left;
overflow: hidden;
... ... @@ -1340,16 +1388,19 @@
}
.good-price {
font-size: 14px;
font-weight: 300;
color: #000;
text-align: center;
}
.good-num {
font-size: 14px;
font-weight: 300;
color: #000;
text-align: center;
}
.good-operate {
font-size: 14px;
font-weight: 300;
color: #000;
text-align: right;
a {
... ... @@ -1376,6 +1427,7 @@
text-align: center;
margin:0 13px;
font-size: 18px;
font-weight: 300;
color: #444;
display: inline-block;
font-weight: normal;
... ... @@ -1389,6 +1441,7 @@
cursor: pointer;
float: right;
font-size: 16px;
font-weight: 300;
margin-right: 0;
&.cur {
border-bottom: none;
... ... @@ -1423,6 +1476,7 @@
width:100%;
overflow: hidden;
font-size: 12px;
font-weight: 300;
.goods {
width: 990px;
... ... @@ -1453,6 +1507,7 @@
.name {
display: block;
font-size: 12px;
font-weight: 300;
color: #222;
text-align: center;
height: 12px;
... ... @@ -1487,6 +1542,7 @@
margin: 0 auto;
color: #3a3a3a;
font-size: 14px;
font-weight: 300;
width: 110px;
height: 28px;
line-height: 28px;
... ... @@ -1585,6 +1641,7 @@
margin-top: 23px;
margin-bottom: 23px;
font-size: 14px;
font-weight: 300;
color: #444;
line-height: 1.5;
font-weight: normal;
... ...