Authored by 沈志敏

Merge branch 'release/5.1' of git.yoho.cn:fe/yohobuywap-node into release/5.1

... ... @@ -125,7 +125,7 @@ const favoriteBrand = (req, res, next) => {
}
res.json({
code: 200,
message: '收藏成功',
message: data.message,
data: ''
});
}).catch(next);
... ...
... ... @@ -98,7 +98,7 @@ const getDetailData = (req, res, next) => {
res.render('plustar/detail', {
module: 'guang',
page: 'plustar-detail',
title: result.brandName,
title: result.brand_name,
pageHeader: headerModel.setNav({
navTitle: result.brand_name
}),
... ... @@ -108,7 +108,7 @@ const getDetailData = (req, res, next) => {
res.render('plustar/detail', {
module: 'guang',
page: 'plustar-detail',
title: result.brandName,
title: result.brand_name,
ps: result,
uid: uid,
isApp: isApp ? true : false
... ...
... ... @@ -252,9 +252,6 @@ const getRelatedEditorial = (brandId, uid, udid, clientType, isApp) => {
pageView: data.views_num
});
});
return list;
} else {
logger.error('editorial data return code is not 200');
... ... @@ -264,13 +261,19 @@ const getRelatedEditorial = (brandId, uid, udid, clientType, isApp) => {
};
// 是否收藏
const isCollection = (uid, brandId, clientType) => {
return serviceAPI.get('shops/service/v1/favorite/getUidBrandFav', {
uid: uid,
const isCollection = (brandId, clientType, uid) => {
let param = {
brandId: brandId,
client_type: clientType,
private_key: privateKeyList[clientType]
}).then((result) => {
};
if (uid) {
param.uid = uid;
}
return serviceAPI.get('shops/service/v1/favorite/getUidBrandFav', param).then((result) => {
if (result && result.code === 200) {
... ... @@ -313,7 +316,7 @@ const getDetailData = (id, uid, udid, gender, isApp, clientType) => {
jumpToApp = 1;
}
return Promise.all([isCollection(uid, brandId, clientType), getRelatedEditorial(brandId, uid, udid, clientType, isApp), getNewProduct(brandId, gender, url, isApp)]).then((result) => {
return Promise.all([isCollection(brandId, clientType, uid), getRelatedEditorial(brandId, uid, udid, clientType, isApp), getNewProduct(brandId, gender, url, isApp)]).then((result) => {
list = _.assign(list, {
isLike: result[0],
... ... @@ -341,7 +344,7 @@ const getDetailData = (id, uid, udid, gender, isApp, clientType) => {
* [品牌详情异步数据]
*/
const getDetailDataAsync = (brandId, uid, udid, clientType, isApp) => {
return Promise.all([isCollection(uid, brandId, clientType), getRelatedEditorial(brandId, uid, udid, clientType, isApp)]).then((result) => {
return Promise.all([isCollection(brandId, clientType, uid), getRelatedEditorial(brandId, uid, udid, clientType, isApp)]).then((result) => {
return {
isLike: result[0],
infos: result[1]
... ...
... ... @@ -80,14 +80,18 @@ const _formatOrderGoods = (orderGoods, count, haveLink, tickets) => {
* 获取快递有关信息
* @private
*/
const _assignExpressInfo = (showLogistics, order, result) => {
if (showLogistics && order.express_company.caption && order.express_number) {
Object.assign(result, {
const _assignExpressInfo = (showLogistics, order) => {
let data = {};
if (showLogistics && order.express_company && order.express_company.caption) {
data = {
logisticsUrl: helpers.urlFormat('/home/logistic', {order_code: order.order_code}),
logisticsCompany: order.express_company.caption,
logisticsNum: order.express_number
});
logisticsNum: order.express_number || ''
};
}
return data;
};
/**
... ... @@ -164,7 +168,7 @@ const _getOrderStatus = (order, showLogistics) => {
qrcode: helpers.urlFormat(`/home/QRcode/${order.order_code}`)
});
} else {
_assignExpressInfo(showLogistics, order, result);
Object.assign(result, _assignExpressInfo(showLogistics, order));
}
break;
case 6:
... ... @@ -180,7 +184,7 @@ const _getOrderStatus = (order, showLogistics) => {
qrcode: helpers.urlFormat(`/home/QRcode/${order.order_code}`)
});
} else {
_assignExpressInfo(showLogistics, order, result);
Object.assign(result, _assignExpressInfo(showLogistics, order));
}
break;
default:
... ... @@ -213,7 +217,7 @@ const _getOrderStatus = (order, showLogistics) => {
Object.assign(result, {
unreceived: true
});
_assignExpressInfo(showLogistics, order, result);
Object.assign(result, _assignExpressInfo(showLogistics, order));
break;
case 6:
... ... @@ -221,7 +225,7 @@ const _getOrderStatus = (order, showLogistics) => {
Object.assign(result, {
completed: true
});
_assignExpressInfo(showLogistics, order, result);
Object.assign(result, _assignExpressInfo(showLogistics, order));
break;
default:
break;
... ...
... ... @@ -29,7 +29,7 @@ const closeReasons = () => {
const _assignExpressInfo = (showLogistics, order) => {
let data = {};
if (showLogistics && order.expressCompany.caption) {
if (showLogistics && order.expressCompany && order.expressCompany.caption) {
data = {
logisticsUrl: helpers.urlFormat('/home/logistic', {order_code: order.orderCode}),
logisticsCompany: order.expressCompany.caption,
... ...
... ... @@ -1220,9 +1220,8 @@ const _detailDataPkg = (origin, ua) => {
// });
// }
// 上市期
origin.expectArrivalTime && (dest.periodOfMarket = `${origin.expectArrivalTime}月`);
origin.expect_arrival_time && (dest.periodOfMarket = origin.expect_arrival_time);
// 商品咨询
dest.feedbacks = {
... ...
... ... @@ -44,7 +44,6 @@
<button class="limit-sale data-can-get-limit-code data-bind" id='limit-sale'>获取限购码</button>
<button class="got-limit-sale data-code-empty data-bind">限购码已被抢光</button>
<button class="got-limit-sale data-got-code data-bind">已获取限购码</button>
{{#if periodOfMarket}}
<div class="period-of-market">
<h1>上市期:</h1>
... ...
... ... @@ -16,15 +16,15 @@ module.exports = {
siteUrl: '//m.yohobuy.com',
assetUrl: '//localhost:5001',
domains: {
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/'
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/'
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/'
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/'
},
subDomains: {
host: '.m.yohobuy.com',
... ...
... ... @@ -367,7 +367,6 @@ $basicBtnC: #eb0313;
.period-of-market {
float: right;
margin-right: 1.4rem;
color: #d0021b;
font-size: 24px;
... ...
... ... @@ -60,9 +60,12 @@
.selected {
display: none;
color: #d0021b !important;
font-weight: bold;
height: 79px;
line-height: 40px;
.time {
font-weight: bold;
}
}
.normal {
display: block;
... ...
... ... @@ -5,7 +5,7 @@
font-size: 24px;
line-height: 1.4;
color: #b0b0b0;
padding: 40px 30px 185px;
padding: 30px 30px 185px;
h5 {
font-size: 25px;
... ...