Authored by htoooth

merge master

@@ -51,7 +51,7 @@ const homeNav = [ @@ -51,7 +51,7 @@ const homeNav = [
51 51
52 const getHomeNav = (req, res, next) => { 52 const getHomeNav = (req, res, next) => {
53 res.locals.homeNav = homeNav; 53 res.locals.homeNav = homeNav;
54 - res.locals.userThumb = '//img10.static.yhbimg.com/headimg/2013/11/28/09/' + 54 + res.locals.userThumb = '//img10.static.yhbimg.com/headimg/2013/11/28/09/' +
55 '01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100'; 55 '01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
56 next(); 56 next();
57 }; 57 };
@@ -22,6 +22,14 @@ const sizeInfoAsync = skn => { @@ -22,6 +22,14 @@ const sizeInfoAsync = skn => {
22 22
23 }; 23 };
24 24
  25 +// 退换支持
  26 +const isSupportReturnedSale = skn => {
  27 + return api.get('', {
  28 + method: 'app.product.refundExchange',
  29 + product_skn: skn
  30 + });
  31 +};
  32 +
25 const getProductComfortAsync = pid => { 33 const getProductComfortAsync = pid => {
26 return api.get('', { 34 return api.get('', {
27 method: 'web.productComfort.data', 35 method: 'web.productComfort.data',
@@ -85,5 +93,6 @@ module.exports = { @@ -85,5 +93,6 @@ module.exports = {
85 getProductModelCardAsync, 93 getProductModelCardAsync,
86 getProductModelTryAsync, 94 getProductModelTryAsync,
87 getProductAsync, 95 getProductAsync,
88 - getPromotionAsync 96 + getPromotionAsync,
  97 + isSupportReturnedSale
89 }; 98 };
@@ -1306,7 +1306,7 @@ const showMainAsync = (data) => { @@ -1306,7 +1306,7 @@ const showMainAsync = (data) => {
1306 1306
1307 // 获取商品信息 1307 // 获取商品信息
1308 let productInfo = yield productAPI.getProductAsync(data.pid, data.uid, data.isStudent, data.vipLevel) 1308 let productInfo = yield productAPI.getProductAsync(data.pid, data.uid, data.isStudent, data.vipLevel)
1309 - .then(res => currentUserProductInfo(res)); 1309 + .then(currentUserProductInfo);
1310 1310
1311 if (_.isEmpty(productInfo) || _.isEmpty(productInfo.goodsInfo)) { 1311 if (_.isEmpty(productInfo) || _.isEmpty(productInfo.goodsInfo)) {
1312 return Promise.reject({ 1312 return Promise.reject({
@@ -1316,7 +1316,8 @@ const showMainAsync = (data) => { @@ -1316,7 +1316,8 @@ const showMainAsync = (data) => {
1316 1316
1317 let requestData = yield Promise.all([ 1317 let requestData = yield Promise.all([
1318 _getSortNavAsync(productInfo.goodsInfo.smallSortId, data.gender), 1318 _getSortNavAsync(productInfo.goodsInfo.smallSortId, data.gender),
1319 - HeaderModel.requestHeaderData(data.channel) 1319 + HeaderModel.requestHeaderData(data.channel),
  1320 + productAPI.isSupportReturnedSale(productInfo.goodsInfo.skn)
1320 ]); 1321 ]);
1321 1322
1322 // 分类导航 ,seo 1323 // 分类导航 ,seo
@@ -1338,6 +1339,10 @@ const showMainAsync = (data) => { @@ -1338,6 +1339,10 @@ const showMainAsync = (data) => {
1338 productInfo.statGoodsInfo 1339 productInfo.statGoodsInfo
1339 ); 1340 );
1340 1341
  1342 + // 是否支持退换货,true 支持,false 不支持
  1343 + result.detail.supportSaleReturnedService =
  1344 + _.get(requestData, `[2].data.${productInfo.goodsInfo.skn}`, 'N') === 'N';
  1345 +
1341 // 导航 1346 // 导航
1342 result.detail.pathNav = _.concat( 1347 result.detail.pathNav = _.concat(
1343 homeService.getHomeChannelNav(data.channel), 1348 homeService.getHomeChannelNav(data.channel),
@@ -635,6 +635,12 @@ @@ -635,6 +635,12 @@
635 </div> 635 </div>
636 </div> 636 </div>
637 637
  638 + {{#if supportSaleReturnedService}}
  639 + <div class="support-saleReturned-service"></div>
  640 + {{^}}
  641 + <div class="not-support-saleReturned-service"></div>
  642 + {{/if}}
  643 +
638 <div class="service"></div> 644 <div class="service"></div>
639 {{#if latestWalk}} 645 {{#if latestWalk}}
640 <div class="info-block latest-walk"> 646 <div class="info-block latest-walk">
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 </div> 26 </div>
27 <div class="good-detail-img"> 27 <div class="good-detail-img">
28 <a class="good-thumb" href="{{url}}" target="_blank"> 28 <a class="good-thumb" href="{{url}}" target="_blank">
29 - <img class="lazy" data-original="{{image thumb 220 300}}"> 29 + <img class="lazy" data-original="{{image thumb 280 382}}">
30 </a> 30 </a>
31 {{# is_few}} 31 {{# is_few}}
32 <p class="few-tag">即将售罄</p> 32 <p class="few-tag">即将售罄</p>
1 { 1 {
2 "name": "yohobuy-node", 2 "name": "yohobuy-node",
3 - "version": "4.9.4", 3 + "version": "4.9.5",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -985,7 +985,7 @@ @@ -985,7 +985,7 @@
985 } 985 }
986 } 986 }
987 987
988 - .service { 988 + .support-saleReturned-service {
989 $service: product/service.png; 989 $service: product/service.png;
990 990
991 width: width($service); 991 width: width($service);
@@ -994,6 +994,14 @@ @@ -994,6 +994,14 @@
994 background: resolve($service); 994 background: resolve($service);
995 } 995 }
996 996
  997 + .not-support-saleReturned-service {
  998 + $service: product/limit.png;
  999 + width: width($service);
  1000 + height: height($service);
  1001 + margin: 45px auto;
  1002 + background: resolve($service);
  1003 + }
  1004 +
997 .latest-walk { 1005 .latest-walk {
998 overflow: inherit; 1006 overflow: inherit;
999 1007