Authored by yyq

Merge branch 'feature/cartNum' into release/5.2

... ... @@ -37,7 +37,7 @@ exports.getCouponData = (channel, params) => {
result.headerData = requestData[1].headerData;
do {
do { // eslint-disable-line
if (!coupon.data || !Array.isArray(coupon.data) || coupon.data.length === 0) {
break;
}
... ... @@ -86,13 +86,13 @@ exports.getCouponStatus = (params) => {
return Promise.coroutine(function*() {
const coupon = yield api.get('', Object.assign(params, {
method: 'app.promotion.queryCouponCenter'
}), config.apiCache);
}));
const result = {
code: coupon.code,
categories: []
};
do {
do { // eslint-disable-line
if (!coupon.data || !Array.isArray(coupon.data) || coupon.data.length === 0) {
break;
}
... ...
... ... @@ -328,10 +328,9 @@ const _detailDataPkg = (origin) => {
// 商品购买状态
let soldOut = !!(propOrigin('status') === 0 || skuData.totalStorageNum === 0);
let notForSale = propOrigin('attribute') === 2; // 非卖品
let virtualGoods = propOrigin('attribute') === 3; // 虚拟商品
if (!soldOut && !notForSale && !virtualGoods) {
if (!soldOut && !virtualGoods) {
result.addToCart = 1;
}
... ...
... ... @@ -407,19 +407,6 @@
'', /*品牌名*/ '', /*商品库存状态1或是0*/ '', /*网络价*/ '', /*收藏人数*/ ''
]);
_mvq.push(['$logData']);
var _goodsData = {
id: '{{productId}}',// 商品ID
name: '{{productName}}', // 商品名称
brand: '{{brandName}}', // 商品品牌(非必填)
origPrice: '{{marketPrice}}', // 商品原价(非必填)
price: '{{salePrice}}', // 商品售价
imgUrl: '{{imageUrl}}', // 商品预览图
productUrl: '{{productUrl}}', // 商品URL地址
categoryId: '{{smallSortId}}', // 所属分类ID
category: '{{fullSortName}}', // 所属分类完整路径, // 所属分类完整路径
soldOut: '{{soldOut}}' // 状态 1下架,0在售(必填)
};
(function() {
var mvl = document.createElement('script');
mvl.type = 'text/javascript';
... ...
... ... @@ -27,20 +27,6 @@ var _gaq = _gaq || [];
})();
</script>
<script>
window._py = window._py||[];
window._py.push(['a', 'MC..o8vMMWxEXDCiqYckD81lUX']);
window._py.push(['domain','stats.ipinyou.com']);
window._py.push(['e','']);
if(typeof _goodsData!='undefined'){
window._py.push(['pi',_goodsData]);
}
-function(d){
var f = 'https:' == d.location.protocol;var c = d.createElement('script');c.type='text/javascript';c.async=1;
c.src=(f ? 'https' : 'http') + '://'+(f?'fm.ipinyou.com':'fm.p0y.cn')+'/j/t/adv.js';
var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h);
}(document);
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
... ...
... ... @@ -98,7 +98,7 @@
<a href="//www.yohobuy.com/shopping/cart">
<span class="iconfont ">&#xe600;</span>
{{#unless @root.pc.common.removeCartCount}}
<span class="goods-num-tip">0</span>
<span class="goods-num-tip hide">0</span>
{{/unless}}
</a>
{{#unless @root.pc.common.disCartHover}}
... ...
... ... @@ -312,7 +312,7 @@ function submitSearch() {
// 同步mini购物车数据
function syncCratInfo(strG) {
var info, total;
var info, total = 0;
if (strG) {
window.setCookie('_g', strG, {
... ... @@ -335,6 +335,8 @@ function syncCratInfo(strG) {
});
$goodsNum.text(total);
}
total ? $goodsNum.removeClass('hide') : $goodsNum.addClass('hide');
}
function loadCartDetail(key) {
... ...