Authored by htoooth

add

... ... @@ -1242,11 +1242,13 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
if (propOrigin('format_sales_price', '0') !== '0') {
result.presalePrice = propOrigin('format_sales_price');
delete result.salePrice;
result.hasOtherPrice = true;
} else {
result.presalePrice = result.marketPrice;
delete result.marketPrice;
}
delete result.salePrice;
result.hasOtherPrice = false;
// 普通预售
result.presale = 'Y';
}
... ... @@ -1380,8 +1382,8 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
statGoodsInfo.productId = propOrigin('product_id');
statGoodsInfo.productName = result.name.replace('\'', '’');
statGoodsInfo.brandName = (result.brandName || '').replace('\'', '’');
statGoodsInfo.marketPrice = result.marketPrice.replace('¥', ''); // 数字
statGoodsInfo.salePrice = (result.salePrice ? result.salePrice : result.marketPrice).replace('¥', ''); // 数字
statGoodsInfo.marketPrice = (result.marketPrice ? result.marketPrice : result.presalePrice).replace('¥', ''); // 数字
statGoodsInfo.salePrice = (result.salePrice ? result.salePrice : (result.marketPrice || result.presalePrice)).replace('¥', ''); // 数字
statGoodsInfo.imageUrl = 'http:' + result.img.split('?')[0];
statGoodsInfo.productUrl = 'http:' +
helpers.urlFormat(url.parse(propOrigin('product_url')).pathname, null, 'item');
... ...
... ... @@ -145,9 +145,14 @@
{{/if}}
<span id="sold-out" class="buy-btn dis{{#unless soldOut}} hide{{/unless}}">
<i class="iconfont">&#xe61c;</i> 已售罄
</span>
<span id="enable-notify" class="buy-btn hide"> <i class="iconfont">
&#xe63d;</i> <span>到货通知</span></span>
<span id="collect-product" class="{{#if isCollect}}coled {{/if}}collect-product">
<i class="iconfont">&#xe611;</i> {{#if isCollect}} <em>已收藏</em> {{^}} <em>收藏商品</em> {{/if}}
</span>
... ...
... ... @@ -20,11 +20,11 @@ module.exports = {
// test2
singleApi: 'http://192.168.102.27:8092/brower',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
//api: 'http://api-test2.yohops.com:9999/',
//service: 'http://service-test2.yohops.com:9999/',
//api: 'http://api.yoho.cn/',
//service: 'http://service.yoho.cn/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
// api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
... ...
... ... @@ -314,7 +314,11 @@ bindEvent.add(function() {
// 是否能:量贩购买,量贩小于库存才能购买
function canBundleBuy() {
return isBundleProduct && goodsBaseNum <= maxStock;
if (maxStock === -1) { // 未选中状态
return true;
} else {
return goodsBaseNum <= maxStock;
}
}
// 重置Num显示为最小购买数
... ... @@ -410,8 +414,6 @@ bindEvent.add(function() {
// 隐藏尺码提示
$sizeWarn.addClass('hide');
maxStock = -1;
if ($this.hasClass('focus')) {
// 已获取焦点的颜色再次点击,清除尺码的选中
... ... @@ -456,6 +458,12 @@ bindEvent.add(function() {
}
}
maxStock = +$('.size:not(.hide) li.focus').data('num');
if (!maxStock) {
maxStock = -1;
}
resetNum();
showStorage();
switchBtnStatus($this);
... ...
... ... @@ -244,10 +244,13 @@
}
.arrival-date {
display: inline-block;
color: #ee0014;
font-size: 14px;
font-size: 13px;
font-weight: bold;
margin-left: 24px;
height: 17px;
padding-top: 3px;
}
.desc {
... ... @@ -498,7 +501,7 @@
margin-bottom: 5px;
margin-right: 10px;
cursor: pointer;
border: 1px solid #eaeceb;
border: 1px solid #999999;
height: 34px;
&.focus {
... ... @@ -536,7 +539,7 @@
margin-right: 10px;
margin-bottom: 5px;
padding: 0 10px;
border: 1px solid #bbbbbb;
border: 1px solid #999999;
text-align: center;
cursor: pointer;
min-width: 10px;
... ...