Authored by ccbikai(👎🏻🍜)

Merge remote-tracking branch 'origin/hotfix/weshareid' into gray

... ... @@ -3,12 +3,17 @@
*/
'use strict';
const serviceApi = global.yoho.ServiceAPI;
const _ = require('lodash');
/**
* 从接口获取 share 内容
* @returns {*|Promise.<TResult>}
*/
const getShareContent = (params) => {
if (!_.isNumber(params.shareId)) {
return Promise.resolve({});
}
return serviceApi.get('operations/api/v5/webshare/getShare', {
share_id: params.shareId
}).then(result => {
... ...
... ... @@ -131,7 +131,7 @@ const getShopIntro = (shopId, uid) => {
shop_id: shopId
};
if (uid) {
if (uid && uid !== 'undefined') {
params.uid = uid;
}
... ... @@ -582,7 +582,8 @@ const getShopData = (req, shopId, uid, isApp) => {
let seoResult = _getBrandShopSeo(channel, shopInfoResult, req.query);
/* 基础店铺返回程序内的跳转信号,跳转到基础店铺 */
if (shopInfoResult && shopInfoResult.shop_template_type && parseInt(shopInfoResult.shop_template_type, 10) === 1) {
if (shopInfoResult && shopInfoResult.shop_template_type &&
parseInt(shopInfoResult.shop_template_type, 10) === 1) {
return {
goBrand: shopInfoResult
};
... ... @@ -625,12 +626,10 @@ const getShopData = (req, shopId, uid, isApp) => {
if (result[0]) {
shopFilterSearchData.filter = productProcess.processFilter(result[0].filter || []);
shopFilterSearchData.goods = productProcess.processProductList(result[0].product_list || [], {isApp: isApp});
shopFilterSearchData.goods =
productProcess.processProductList(result[0].product_list || [], {isApp: isApp});
}
/* 店铺优惠券 */
let shopCoupons = result[1] || [];
// 店铺分类
return _getShopCategory(shopId, channel).then(shopCategory => {
... ...