Authored by zhangxiaoru

merge

... ... @@ -108,40 +108,45 @@ const _pageArticleContent = (articleContent, isApp, gender) => {
let callArtGoodGroup = (ii, len2) => {
if (ii < len2) {
let goods = art.goodsGroup.data[ii];
let good = {
thumb: goods.cover ? helpers.image(goods.cover.cover, 235, 314) : '',
type: goods.cover ? guangProcess.getProductIcon(goods.cover.maxSortId) : '',
goods: []
};
let skns = [];
let arr = [];
goods.list.forEach((mini) => {
skns.push(mini.id);
arr[mini.id] = mini.src;
});
// 通过SKN获取商品信息
productDetailModel.productInfoBySkns(skns).then((product) => {
if (product && product.data && product.data.product_list) {
let g = [];
product.data.product_list.forEach(_ => {
g.push(guangProcess.formatProduct(_, false, true, true, 235, 314, isApp, gender));
});
g.forEach(p => {
if (arr[p.id]) {
p.thumb = helpers.image(arr[p.id], 235, 314);
good.goods.push(p);
if (goods) {
let good = {
thumb: goods.cover ? helpers.image(goods.cover.cover, 235, 314) : '',
type: goods.cover ? guangProcess.getProductIcon(goods.cover.maxSortId) : '',
goods: []
};
let skns = [];
let arr = [];
goods.list.forEach((mini) => {
skns.push(mini.id);
arr[mini.id] = mini.src;
});
// 通过SKN获取商品信息
productDetailModel.productInfoBySkns(skns).then((product) => {
if (product && product.data && product.data.product_list) {
let g = [];
product.data.product_list.forEach(_ => {
g.push(guangProcess.formatProduct(_, false, true, true, 235, 314, isApp, gender));
});
g.forEach(p => {
if (arr[p.id]) {
p.thumb = helpers.image(arr[p.id], 235, 314);
good.goods.push(p);
}
});
if (!build.collocation) {
build.collocation = [];
}
});
if (!build.collocation) {
build.collocation = [];
build.collocation.push(good);
}
build.collocation.push(good);
}
callArtGoodGroup(++ii, len2);
});
} else {
callArtGoodGroup(++ii, len2);
});
}
} else {
contents.push(build);
joinContentFunc(++i, len);
... ...
... ... @@ -64,7 +64,7 @@ const _getOrderStatus = (order, showLogistics) => {
/* 待付款 */
Object.assign(result, {
unpaid: true,
payUrl: helpers.urlFormat('/home/orders/pay', {order_code: order.order_code})
payUrl: helpers.urlFormat('/home/orders/pay', {order_code: order.orderCode})
});
break;
case 1:
... ... @@ -87,7 +87,7 @@ const _getOrderStatus = (order, showLogistics) => {
/* 是否门票 */
if (order.virtualType && parseInt(order.virtualType, 10) === 3) {
Object.assign(result, {
qrcode: helpers.urlFormat(`/home/QRcode/${order.order_code}`)
qrcode: helpers.urlFormat(`/home/QRcode/${order.orderCode}`)
});
} else {
Object.assign(result, _assignExpressInfo(showLogistics, order));
... ... @@ -103,7 +103,7 @@ const _getOrderStatus = (order, showLogistics) => {
/* 是否门票 */
if (order.virtual_type && parseInt(order.virtual_type, 10) === 3) {
Object.assign(result, {
qrcode: helpers.urlFormat(`/home/QRcode/${order.order_code}`)
qrcode: helpers.urlFormat(`/home/QRcode/${order.orderCode}`)
});
} else {
Object.assign(result, _assignExpressInfo(showLogistics, order));
... ...
... ... @@ -1511,14 +1511,16 @@ let getProductAsyncData = (data) => {
return Promise.all([_getPromotionInfo(result.product_skn), _getFavorite(result.product_id, data.uid)]).then((res) => {
result.promotionBoList = res[0];
var isFavorite = res[1];
finalResult = _detailDataPkgAsync(result, data.uid, data.vipLevel, data.ua);
finalResult.isCollect = isFavorite;
if (finalResult.cartInfo) {
finalResult.cartInfo.isCollect = isFavorite;
}
finalResult.isStudent = data.isStudent;
return finalResult;
return _detailDataPkgAsync(result, data.uid, data.vipLevel, data.ua).then(pkg => {
finalResult = pkg;
finalResult.isCollect = isFavorite;
if (finalResult.cartInfo) {
finalResult.cartInfo.isCollect = isFavorite;
}
finalResult.isStudent = data.isStudent;
return finalResult;
});
});
});
... ...
... ... @@ -51,7 +51,8 @@ module.exports = {
infoFile: {
name: 'info',
level: 'info',
filename: 'logs/info.log'
filename: 'logs/info.log',
maxFiles: 7
},
errorFile: {
name: 'error',
... ...
... ... @@ -45,7 +45,7 @@ module.exports = () => {
res.set({
'Cache-Control': 'no-cache',
Pragma: 'no-cache',
Expires: new Date(1900, 0, 1, 0, 0, 0, 0)
Expires: (new Date(1900, 0, 1, 0, 0, 0, 0)).toUTCString()
});
}
... ...
{
"name": "m-yohobuy-node",
"version": "5.1.2",
"version": "5.1.3",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -202,9 +202,9 @@ $.extend({
$footer.removeClass('hide');
// 接受微信商城或者第三方来源的数据埋点信息
// 单击下载按钮 - 接受微信商城或者第三方来源的数据埋点信息
if (queryString().mkt_code) {
setCookie('mkt_code', queryString().mkt_code);
setCookie('unionType', queryString().mkt_code);
}
}());
... ...
... ... @@ -25,16 +25,24 @@ function getQueryString(name) {
}
function downLoadApp() {
var appUrl = 'http://www.yohoshow.com/about/index/yohobuyqr/';
var appUrl = 'http://union.yoho.cn/union/downapp.html';
var clickedAt = new Date();
setTimeout(function() {
var mkt = getQueryString('mkt_code');
var mkt = window.queryString.mkt_code || window.cookie('unionType') || false;
if ((new Date()) - clickedAt < 2000) {
if (mkt) {
appUrl += '?union_type=' + mkt;
}
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
op: 'YB_DOWNLOAD_C',
param: JSON.stringify({C_ID: window._ChannelVary[window.cookie('_Channel')] || 1, TO_URL: appUrl})
}, true);
}
window.location = appUrl;
}
}, 500);
... ...
... ... @@ -127,7 +127,7 @@ plusstar = {
TAB_ID: that.ParentLiDom.index() + 1,
F_ID: $dom.closest('ul').data('id'),
F_NAME: '焦点图',
F_URL: $dom.find('a').attr('href'),
F_URL: encodeURIComponent($dom.find('a').attr('href').replace(/\"/g, '\\"')),
F_INDEX: 1,
I_INDEX: index % 2 + 1// banner,li是双倍的
}, speckParamApp))
... ... @@ -143,7 +143,7 @@ plusstar = {
TAB_ID: that.ParentLiDom.index() + 1,
F_ID: $dom.data('fid'),
F_NAME: $dom.data('name'),
F_URL: $domA.attr('href'),
F_URL: encodeURIComponent($domA.attr('href').replace(/\"/g, '\\"')),
F_INDEX: $dom.index() + 1,
I_INDEX: $domA.hasClass('more') ? 0 : ($domA.index() + 1)
}, speckParamApp))
... ...