Authored by htoooth

merge master

... ... @@ -22,6 +22,14 @@ const sizeInfoAsync = skn => {
};
// 退换支持
const isSupportReturnedSale = skn => {
return api.get('', {
method: 'app.product.refundExchange',
product_skn: skn
});
};
const getProductComfortAsync = pid => {
return api.get('', {
method: 'web.productComfort.data',
... ... @@ -85,5 +93,6 @@ module.exports = {
getProductModelCardAsync,
getProductModelTryAsync,
getProductAsync,
getPromotionAsync
getPromotionAsync,
isSupportReturnedSale
};
... ...
... ... @@ -1306,7 +1306,7 @@ const showMainAsync = (data) => {
// 获取商品信息
let productInfo = yield productAPI.getProductAsync(data.pid, data.uid, data.isStudent, data.vipLevel)
.then(res => currentUserProductInfo(res));
.then(currentUserProductInfo);
if (_.isEmpty(productInfo) || _.isEmpty(productInfo.goodsInfo)) {
return Promise.reject({
... ... @@ -1316,7 +1316,8 @@ const showMainAsync = (data) => {
let requestData = yield Promise.all([
_getSortNavAsync(productInfo.goodsInfo.smallSortId, data.gender),
HeaderModel.requestHeaderData(data.channel)
HeaderModel.requestHeaderData(data.channel),
productAPI.isSupportReturnedSale(productInfo.goodsInfo.skn)
]);
// 分类导航 ,seo
... ... @@ -1338,6 +1339,10 @@ const showMainAsync = (data) => {
productInfo.statGoodsInfo
);
// 是否支持退换货,true 支持,false 不支持
result.detail.supportSaleReturnedService =
_.get(requestData, `[2].data.${productInfo.goodsInfo.skn}`, 'N') === 'N';
// 导航
result.detail.pathNav = _.concat(
homeService.getHomeChannelNav(data.channel),
... ...
... ... @@ -635,6 +635,12 @@
</div>
</div>
{{#if supportSaleReturnedService}}
<div class="support-saleReturned-service"></div>
{{^}}
<div class="not-support-saleReturned-service"></div>
{{/if}}
<div class="service"></div>
{{#if latestWalk}}
<div class="info-block latest-walk">
... ...
... ... @@ -26,7 +26,7 @@
</div>
<div class="good-detail-img">
<a class="good-thumb" href="{{url}}" target="_blank">
<img class="lazy" data-original="{{image thumb 220 300}}">
<img class="lazy" data-original="{{image thumb 280 382}}">
</a>
{{# is_few}}
<p class="few-tag">即将售罄</p>
... ...
{
"name": "yohobuy-node",
"version": "4.9.4",
"version": "4.9.5",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -985,7 +985,7 @@
}
}
.service {
.support-saleReturned-service {
$service: product/service.png;
width: width($service);
... ... @@ -994,6 +994,14 @@
background: resolve($service);
}
.not-support-saleReturned-service {
$service: product/limit.png;
width: width($service);
height: height($service);
margin: 45px auto;
background: resolve($service);
}
.latest-walk {
overflow: inherit;
... ...