Authored by yyq

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

... ... @@ -394,9 +394,10 @@ 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 original = Math.round(Math.abs(x) * 100) / 100;
var s = original.toString();
var rs = s.indexOf('.');
if (rs < 0) {
rs = s.length;
s += '.';
... ... @@ -409,18 +410,19 @@ const formatPromotion = (it, selectedGiftsList) => {
if (status === 0) {
console.log(toDecimal(info.conditionValue));
let tipTxtMoney = `还差${ toDecimal(info.conditionValue)}`;
let tipTxt = `还差${ -(Math.round(parseFloat(info.conditionValue) * 100) / 100)}`;
if (info.conditionUnit === 1) {
tipTxt += '件满足';
} else if (info.conditionUnit === 2) {
tipTxt += '元满足';
tipTxt = tipTxtMoney + '元满足';
}
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) {
... ...
... ... @@ -59,7 +59,7 @@
<div class="body-modal-black"></div>
<div id="Y_goodsSelectWin" class="goods-select-win mmodal-dialog cart-togetherGoods" style="top:50px;">
<div class="close" data-role="mdialog-close">
<i class="iconfont">&#xe60d;</i>
<i class="iconfont">&#xe6ee;</i>
</div>
<div class="content goods-select-content">
<div class="detail-body"></div>
... ...
... ... @@ -28,7 +28,7 @@
<div class="pay-wapper">
<div class="cart-title">
<p class="left" style="width:6%;">
<i class="cart-item-check iconfont"></i>&nbsp;&nbsp;全选
<i class="cart-item-check-title cart-item-check iconfont"></i>&nbsp;&nbsp;全选
</p>
<p style="width:35%">商品信息</p>
<p style="width:14%">单价</p>
... ...
... ... @@ -2,7 +2,7 @@
<div class="body-modal-black"></div>
<div class="mmodal-dialog cart-preSell-dialog" style="top:50px;margin-left: -267px;">
<div class="close" data-role="mdialog-close">
<i class="iconfont">&#xe60d;</i>
<i class="iconfont">&#xe6ee;</i>
</div>
<div class="content">
<div class="detail-body">
... ...
... ... @@ -9,9 +9,9 @@
{{#or isGift isPriceGift}}
{{#if isNotReach}}
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单&nbsp;></a>
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去凑单&nbsp;<i class="iconfont">&#xe6ef;</i></a>
{{/if}}
{{else}}
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去查看&nbsp;></a>
<a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">去查看&nbsp;<i class="iconfont">&#xe6ef;</i></a>
{{/or}}
</div>
... ...
No preview for this file type
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Tue Jan 24 14:14:23 2017
Created by FontForge 20120731 at Thu Feb 16 19:45:08 2017
By admin
</metadata>
<defs>
... ... @@ -276,7 +276,8 @@ d="M958 589q0 15 -10.5 25.5t-25.5 10.5t-26 -10l-384 -384l-384 384q-11 10 -26 10t
d="M512 -62q-91 0 -173.5 35.5t-142 95t-95 142t-35.5 173.5t35.5 173.5t95 142t142 95t173.5 35.5t173.5 -35.5t142 -95t95 -142t35.5 -173.5t-35.5 -173.5t-95 -142t-142 -95t-173.5 -35.5zM512 766q-104 0 -192 -51t-139 -139t-51 -192t51 -192t139 -139t192 -51t192 51
t139 139t51 192t-51 192t-139 139t-192 51zM464 592q0 -20 14 -34t34 -14t34 14t14 34t-14 34t-34 14t-34 -14t-14 -34zM512 128q-13 0 -22.5 9.5t-9.5 22.5v288q0 13 9.5 22.5t22.5 9.5t22.5 -9.5t9.5 -22.5v-288q0 -13 -9.5 -22.5t-22.5 -9.5z" />
<glyph glyph-name="yuanxingweixuanzhong" unicode="&#xe6c3;"
d="M512 -64q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5t-131.5 -316.5t-316.5 -131.5zM512 768q-159 0 -271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5z" />
d="M512 -126q-104 0 -198 40.5t-162.5 109t-109 162.5t-40.5 198t40.5 198t109 162.5t162.5 109t198 40.5t198 -40.5t162.5 -109t109 -162.5t40.5 -198t-40.5 -198t-109 -162.5t-162.5 -109t-198 -40.5zM512 821q-89 0 -170 -34.5t-139.5 -93t-93 -139.5t-34.5 -170
t34.5 -170t93 -139.5t139.5 -93t170 -34.5t170 34.5t139.5 93t93 139.5t34.5 170t-34.5 170t-93 139.5t-139.5 93t-170 34.5z" />
<glyph glyph-name="Fill" unicode="&#xe6c9;"
d="M512 52q-34 0 -58.5 24.5t-24.5 59t24.5 58.5t58.5 24t58.5 -24t24.5 -58.5t-24.5 -59t-58.5 -24.5zM457 660q0 23 16 39.5t39 16.5t39 -16.5t16 -39.5v-304q0 -22 -16 -38.5t-39 -16.5t-39 16.5t-16 38.5v304zM512 896h-6q-104 0 -199 -40.5t-163.5 -109t-109 -163.5
t-40.5 -199t40.5 -199t109 -163.5t163.5 -109t199 -40.5h6h6q104 0 199 40.5t163.5 109t109 163.5t40.5 199t-40.5 199t-109 163.5t-163.5 109t-199 40.5h-6z" />
... ... @@ -329,5 +330,18 @@ t90.5 135t135 90.5t163 33.5zM237 64l595 595q102 -123 102 -275q0 -114 -55.5 -211t
<glyph glyph-name="shiliangzhinengduixiang1" unicode="&#xe6e2;"
d="M515 -128q60 0 105.5 40t52.5 98h-322q11 -58 57 -98t107 -40zM852 225q-15 31 -15 123v113q0 111 -56 200t-149 127q-7 47 -42 77.5t-81 30.5q-51 0 -87 -36q-26 -27 -35 -72q-93 -42 -149 -131t-56 -196v-113q0 -97 -16 -128q-30 -10 -46 -20q-20 -31 -20 -57
q0 -31 24 -53.5t58 -22.5h660q34 0 58 22.5t24 53.5q-4 31 -24.5 54.5t-47.5 27.5z" />
<glyph glyph-name="weibiaoti-" unicode="&#xe6ed;"
d="M512 896q-212 0 -362 -150t-150 -362t150 -362t362 -150t362 150t150 362t-150 362t-362 150zM512 -39q-114 0 -211.5 57t-154.5 154.5t-57 211.5t57 211.5t154.5 154.5t211.5 57t211.5 -57t154.5 -154.5t57 -211.5t-57 -211.5t-154.5 -154.5t-211.5 -57zM512 316
q18 0 31 13t13 31v246q0 18 -13 31t-31 13t-31 -13t-13 -31v-246q0 -18 13 -31t31 -13zM512 183zM444 182.5q0 -28.5 20 -48.5t48 -20t48 20t20 48.5t-20 48.5t-48 20t-48 -20t-20 -48.5z" />
<glyph glyph-name="weibiaoti-1" unicode="&#xe6ee;"
d="M922 883l-410 -409l-410 409l-89 -89l409 -410l-409 -410l89 -89l410 409l410 -409l89 89l-409 410l409 410z" />
<glyph glyph-name="weibiaoti-2" unicode="&#xe6ef;"
d="M230 759l367 -366l-367 -359l120 -119l367 358l119 120l-119 119l-367 367z" />
<glyph glyph-name="weibiaoti-3" unicode="&#xe6f0;"
d="M512 446l-196 -202l-39 39l196 202l39 39l39 -39l196 -202l-39 -39z" />
<glyph glyph-name="weibiaoti-4" unicode="&#xe6f1;"
d="M512 306l-196 201l-39 -45l235 -235l235 235l-39 45z" />
<glyph glyph-name="weibiaoti-5" unicode="&#xe6f2;"
d="M512 384zM32 384q0 -130 64.5 -240.5t175 -175t240.5 -64.5t240.5 64.5t175 175t64.5 240.5t-64.5 240.5t-175 175t-240.5 64.5t-240.5 -64.5t-175 -175t-64.5 -240.5z" />
</font>
</defs></svg>
... ...
No preview for this file type
No preview for this file type
... ... @@ -76,7 +76,7 @@
{{/each}}
</div>
{{/each}}
<p class="size-p-tip" style="display:none;"><i class="iconfont">&#xe6c2;</i>请选择尺码</p>
<p class="size-p-tip" style="display:none;"><i class="iconfont">&#xe6ed;</i>请选择尺码</p>
<!--<p class="size-p">内长&nbsp;25.5com</p>-->
</dt>
</dl>
... ... @@ -85,8 +85,8 @@
<dt>
<div class="amount_wrapper">
<input type="text" id="num" class="num" value="1" readonly="readonly">
<a class="amount cut"><i class="iconfont">&#xe6c1;</i></a>
<a class="amount add"><i class="iconfont">&#xe6c0;</i></a>
<a class="amount cut"><i class="iconfont">&#xe6f1;</i></a>
<a class="amount add"><i class="iconfont">&#xe6f0;</i></a>
</div>
</dt>
</dl>
... ...
/**
* Created by yoho on 2017-01-05.
*/
var $ = require('yoho-jquery'),
var $ = require('yoho-jquery'), // eslint-disable-line
rDialog = require('./rdialog'),
RConfirm = rDialog.RConfirm,
RAlert = rDialog.RAlert,
... ... @@ -344,7 +343,7 @@ Cart = {
},
submit: function() {
var content = '<div><i class="iconfont icon-tip">&#xe6c2;</i>您还未选择赠品</div><p>是否去选择赠品?</p>';
var content = '<div><i class="iconfont icon-tip">&#xe6ed;</i>您还未选择赠品</div><p>是否去选择赠品?</p>';
var $this = $(this);
if ($this.hasClass('btn-account-disable')) {
... ...
.mmodal-dialog {
.close {
top: 17px;
right: 20px;
.iconfont {
font-size: 16px;
}
}
}
.cart-togetherGoods {
margin-left: -350px;
width: 690px;
... ... @@ -6,15 +15,6 @@
height: auto;
overflow: hidden;
background: #fff;
&.yoho-dialog {
.close {
top: 10px;
right: 10px;
.iconfont {
font-size: 20px;
}
}
}
.side-img-dd {
width: 583px;
... ... @@ -325,8 +325,8 @@
i{
width: 12px;
height: 12px;
font-size: 12px;
color: #666;
font-size: 14px;
color: #aeaeae;
display: inline-block;
}
}
... ... @@ -371,7 +371,7 @@
color: #d0021b;
font-size: 13px;
i {
font-size: 15px;
font-size: 14px;
display: inline-block;
vertical-align: baseline;
}
... ... @@ -602,12 +602,12 @@
}
.incentive {
position: absolute;
left: 0px;
left: -1px;
bottom: 0px;
width: 100%;
width: 66px;
display: block;
height: 20px;
line-height: 20px;
height: 18px;
line-height: 18px;
font-size: 12px;
text-align: center;
color: #fff;
... ... @@ -622,7 +622,7 @@
box-sizing: border-box;
.detail-body{
text-align: center;
padding: 10px 10px 20px;
padding: 30px 0 25px 0;
.sell-class-title {
padding-top: 10px;
}
... ... @@ -632,7 +632,8 @@
display: inline-block;
.sell-class-title {
border-top: 1px solid #e0e0e0;
padding-left: 13px;
margin-left: 13px;
margin-right: 13px;
}
&:nth-child(1) {
.sell-class-title {
... ... @@ -646,7 +647,7 @@
width: 130px;
height: 30px;
line-height: 30px;
margin-bottom: 25px;
margin-bottom: 20px;
font-size: 15px;
border: 1px solid #000;
box-sizing: border-box;
... ... @@ -663,6 +664,7 @@
}
.pre-sell-tip{
font-size: 14px;
line-height: 14px;
color: #444;
text-after-overflow: center;
}
... ...
... ... @@ -312,6 +312,9 @@
color: #ff575c;
margin-left: 20px;
cursor: pointer;
i {
font-size: 12px;
}
}
.btn-clear {
float: right;
... ... @@ -739,11 +742,10 @@
font-weight: 300;
height: 13px;
line-height: 13px;
color: #9a9a9a;
color: #ff575c;
text-align: left;
box-sizing: border-box;
}
}
.goods-choose-box {
... ... @@ -963,7 +965,6 @@
height: 30px;
color: #444;
font-size: 15px;
font-weight: 300;
border: 1px solid #e0e0e0;
}
.cart-num-btn {
... ... @@ -1254,7 +1255,7 @@
left: 15px;
width: 15px;
height: 15px;
color:#e9e9e9;
color:#d9d9d9;
float: left;
margin-top: 0;
margin-left: 15px;
... ... @@ -1266,6 +1267,21 @@
&:before { content: "\e6cb"; }
}
}
.cart-item-check-title {
position: absolute;
left: 15px;
width: 15px;
height: 15px;
color:#fff;
float: left;
margin-top: 0;
margin-left: 15px;
display: inline-block;
cursor: pointer;
&:before {
content: "\e6f2";
}
}
.cart-title {
position: relative;
... ... @@ -1610,10 +1626,10 @@
border-color: #5f5f5f;
.close {
top: 16px;
right: 16px;
top: 12px;
right: 12px;
i {
font-size: 24px;
font-size: 32px;
}
}
... ... @@ -1661,6 +1677,8 @@
height: 33px;
line-height: 31px;
margin-left: 10px;
font-size: 15px;
font-weight: 300;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
... ... @@ -1669,6 +1687,10 @@
}
}
.alert-sure {
width: 150px;
}
.alert-main {
margin-bottom: 64px;
i {
... ...