Authored by 王水玲

不支持7天无理由退换货

... ... @@ -577,7 +577,6 @@ const getChangeGoodsList = (orderCode, uid) => {
};
let data;
if (result && result.data) {
data = result.data;// camelCase(result.data);
data.hidePrice = true;
... ... @@ -592,6 +591,7 @@ const getChangeGoodsList = (orderCode, uid) => {
data.goods_list.forEach(good => {
let cnAlphabet = good.cn_alphabet ? good.cn_alphabet : '';
good.isLimitSkn = good.is_limit_skn === 'Y'; // is_limit_skn=Y 不支持7天无理由退换货
good.showCheckbox = true;
good.hidePrice = true;
good.buyNumber = 1;
... ...
... ... @@ -13,5 +13,14 @@
{{#if buy_number}}
<p class="bold buy-number"><span class="iconfont">&#xe61d;</span>{{buy_number}}</p>
{{/if}}
{{#if isLimitSkn}}
<div class="not-limit-txt">
该商品不支持7天无理由退换
<i class="helper-icon iconfont">&#xe612;</i>
<span class="helper-txt">
该商品非质量问题不支持退换货,如有疑问,请联系客服。
</span>
</div>
{{/if}}
</div>
</div>
... ...
... ... @@ -9,13 +9,20 @@
<ul class="goods-header">
<li class="info">商品信息</li>
<li class="reason">退货原因</li>
<li class="num">退货数量</li>
<li class="num hide">退货数量</li>
<li class="price">单价</li>
</ul>
{{# goods}}
<div class="goods-item clearfix">
<div class="check" data-skn="{{skn}}" data-skc="{{skc}}" data-sku="{{sku}}" data-price="{{price}}" data-type="{{typeId}}">{{> icon/checkbox}}</div>
<div class="check {{#if limitReturn}}disabled{{/if}}"
data-skn="{{skn}}"
data-skc="{{skc}}"
data-sku="{{sku}}"
data-price="{{price}}"
data-type="{{typeId}}">
{{> icon/checkbox}}
</div>
<div class="img">
<a href="{{https href}}" title="{{name}}" target="_blank">
<img class="lazy" data-original="{{image img 70 90}}">
... ... @@ -27,17 +34,17 @@
<p>×{{num}}</p>
</div>
<div class="reason">
<select class="refund-reason">
<select class="refund-reason {{#if limitReturn}}disabled{{/if}}" {{#if limitReturn}}disabled{{/if}}>
<option>选择退款原因</option>
{{# reasonList}}
<option value="{{id}}">{{name}}</option>
{{/ reasonList}}
</select>
</div>
<div class="num">
<span class="iconfont">&#xe621;</span>
<div class="num hide">
<span class="iconfont {{#if limitReturn}}disabled{{/if}}">&#xe621;</span>
<input type="text" value="{{num}}" readonly="readonly">
<span class="iconfont">&#xe61f;</span>
<span class="iconfont {{#if limitReturn}}disabled{{/if}}">&#xe61f;</span>
</div>
<div class="price">¥{{round price 2}}</div>
{{#if limitReturn}}
... ... @@ -47,8 +54,7 @@
<i class="iconfont">&#xe612;</i>
<div class="limit-return-wrap">
<div class="code-horn"></div>
<p>考虑到个人卫生,例如内衣、内裤、袜子等贴身塑身类商品,不支持无理由退换货</p>
<p>香水、香薰、化妆品等特殊商品,无质量问题,不支持无理由退换货</p>
<p>该商品非质量问题不支持退换货,如有疑问,请联系客服。</p>
</div>
</span>
</div>
... ...
... ... @@ -13,44 +13,41 @@
<li class="change-num hide">换货数量</li>
</ul>
{{#goods_list}}
<div class="change-info-box">
<div class="table-body">
<div class="goods-container no-price" data-goods-id="{{goods_id}}" data-sku="{{productSku}}" data-id="{{product_id}}" data-skn="{{productSkn}}" data-goods-type="{{goods_type_id}}" data-price="{{last_price}}" data-skc={{productSkc}}>
{{# showCheckbox}}
<span class="checkbox-box">
{{> icon/checkbox}}
</span>
{{/ showCheckbox}}
{{> order/good-info}}
<div class="sub-column">
{{# ../this}}
{{> returns/change-reason}}
{{/ ../this}}
<div class="change-info-box">
<div class="table-body">
<div class="goods-container no-price" data-goods-id="{{goods_id}}" data-sku="{{productSku}}" data-id="{{product_id}}" data-skn="{{productSkn}}" data-goods-type="{{goods_type_id}}" data-price="{{last_price}}" data-skc={{productSkc}}>
{{# showCheckbox}}
<span class="checkbox-box {{#if isLimitSkn}}disabled{{/if}}">
{{> icon/checkbox}}
</span>
{{/ showCheckbox}}
{{> order/good-info}}
<div class="sub-column">
{{> returns/change-reason}}
</div>
<div class="sub-column number">
<span class="minus">-</span>
<span class="value">{{changeNum}}</span>
<span class="plus">+</span>
</div>
</div>
<div class="sub-column number">
<span class="minus">-</span>
<span class="value">{{changeNum}}</span>
<span class="plus">+</span>
</div>
</div>
</div>
<div class="form hide">
<div class="group color">
<span class="title">
<span class="asterisk">*</span>
换货Color: <span class="color-text" data-color={{color_name}}>{{color_name}}</span>
</span>
</div>
<div class="group size">
<span class="title">
<span class="asterisk">*</span>
换货Size: <span class="size-text" data-size="{{size_name}}">{{size_name}}</span>
</span>
<div class="form hide">
<div class="group color">
<span class="title">
<span class="asterisk">*</span>
换货Color: <span class="color-text" data-color={{color_name}}>{{color_name}}</span>
</span>
</div>
<div class="group size">
<span class="title">
<span class="asterisk">*</span>
换货Size: <span class="size-text" data-size="{{size_name}}">{{size_name}}</span>
</span>
</div>
</div>
{{> returns/special-reason}}
</div>
{{> returns/special-reason}}
</div>
{{/goods_list}}
</div>
</div>
... ...
<select class="exchange-reasons" name="exchange-reasons">
<select class="exchange-reasons" name="exchange-reasons" {{#if isLimitSkn}}disabled{{/if}}>
<option value="0">请选择换货原因</option>
{{# exchange_reason}}
{{# @root.content.returnsChange.exchange_reason}}
<option value="{{id}}" {{#if isSpecial}}class="is-special"{{/if}}>{{name}}</option>
{{/ exchange_reason}}
{{/ @root.content.returnsChange.exchange_reason}}
</select>
... ...
... ... @@ -63,7 +63,31 @@ const getProductInfo = (req, res, next) => {
}).catch(next);
};
/**
* 特殊商品退换货
*/
const fetchReturn = (req, res, next) => {
let skn = req.query.skn || 0;
if (!skn) {
return {
code: 400,
message: '商品数据出错'
};
}
return item.fetchReturn(skn).then(result => {
return res.json({
code: 200,
data: {
result: result
}
});
}).catch(next);
};
module.exports = {
index, // 商品详情页
getProductInfo // 获取商品信息接口
getProductInfo, // 获取商品信息接口
fetchReturn
};
... ...
... ... @@ -6,6 +6,7 @@
'use strict';
const api = global.yoho.API;
const config = global.yoho.config;
const SingleAPI = global.yoho.SingleAPI;
/**
... ... @@ -110,11 +111,20 @@ const getBrandBannerAsync = brandId => {
});
};
// 退换支持
const isSupportReturnedSale = skn => {
return api.get('', {
method: 'app.product.refundExchange',
product_skn: skn
}, config.apiCache);
};
module.exports = {
getProductBaseAsync, // 获取商品基本信息
getUserIsFav, // 获取商品用户收藏信息
getsizeInfoAsync, // 获取商品尺码信息
getComfortAsync, // 获取商品材质信息
getModelTryAsync, // 获取商品模特试穿信息
getBrandBannerAsync // 获取品牌Banner信息
getBrandBannerAsync, // 获取品牌Banner信息
isSupportReturnedSale // 是否支持退换货
};
... ...
... ... @@ -161,7 +161,15 @@ const getProductInfo = (productId, skn, uid) => {
});
};
/**
* 是否支持退换货,true 支持,false 不支持
*/
const fetchReturn = (skn) => {
return itemApi.isSupportReturnedSale(skn).then(result => _.get(result, `data.${skn}`, 'N') === 'N' ? 'Y' : 'N');
};
module.exports = {
getProductItemData,
getProductInfo
getProductInfo,
fetchReturn
};
... ...
... ... @@ -23,6 +23,7 @@ router.get('/list/new', list.newPage); // 新品列表页
router.get(/\/pro_([\d]+)_([\d]+)\/(.*)/, item.index); // 商品详情routers
router.post('/item/togglecollect', auth, fav.product); // 商品详情页
router.get('/item/getProductInfo', item.getProductInfo); // 商品详情信息
router.get('/item/fetchReturn', item.fetchReturn); // 7天无理由退换货
router.get('/shop/query/all', shop.indexQuery);
router.get('/shop/:domain/list', shop.list);
... ... @@ -36,4 +37,6 @@ router.get('/getRecommendProduct', recommend.getRecommendProduct);
router.get('/getRecommendShop', recommend.getRecommendShop);
router.get('/recentPreview', recommend.recentPreview);
module.exports = router;
... ...
... ... @@ -7,7 +7,7 @@
{{> path-nav}}
{{# goodInfo}}
<div class="product-main clearfix" data-id="{{id}}">
<div class="product-main clearfix" data-id="{{id}}" data-skn="{{productSkn}}">
<div class="thumbs left clearfix">
<div class="thumb-show right">
<img id="main-thumb" src="{{image img 482 643}}" style="display: block;">
... ... @@ -300,6 +300,16 @@
<div class="detail-content">{{{content}}}</div>
</div>
{{/ details}}
<div class="info-block">
<div class="block-title">
<label class="title-wrapper">
<div class="en">GUARANTEE</div>
<div class="cn">售后保障</div>
</label>
</div>
<div id="saleReturn" class="support-returned-service"></div>
</div>
</div>
<div class="recommend-product"></div>
</div>
... ...
... ... @@ -22,6 +22,7 @@ const index = (req, res, next) => {
let data = result.data;
if (data.goods_list && data.goods_list.length > 0) {
// 设置头部路径索引focus
data.bcNavFocus = 2;
... ... @@ -63,6 +64,11 @@ const index = (req, res, next) => {
data.delivery_address.address = cleanHtml.htmlDecode(data.delivery_address.address);
}
// is_limit_skn=Y 不支持7天无理由退换货
_.forEach(data.goods_list, item => {
item.isLimitSkn = item.is_limit_skn === 'Y';
});
res.header('Cache-Control', 'no-store');
res.display('order', {
content: data,
... ...
... ... @@ -98,6 +98,9 @@
<p class="brand-and-name inline-block">
<a class="brand-name" href="{{https brandUrl}}" target="_blank">{{brand_name}}</a>
<a class="name" href="{{https link}}" target="_blank">{{product_name}}</a>
{{#isLimitSkn}}
<span class="not-support-return"><i class="not-return-icon"></i>不支持7天无理由退换</span>
{{/isLimitSkn}}
</p>
<p class="color-size">
<span class="color">颜色:{{color_name}}</span>
... ...
... ... @@ -22,15 +22,15 @@ module.exports = {
},
cookieDomain: 'yohoblk.com',
domains: {
//singleApi: 'http://single.yoho.cn/',
//api: 'http://api.yoho.yohoops.org/',
//service: 'http://service.yoho.yohoops.org/',
//search: 'http://search.yohoops.org/yohosearch/'
// singleApi: 'http://single.yoho.cn/',
// api: 'http://api.yoho.yohoops.org/',
// service: 'http://service.yoho.yohoops.org/',
// search: 'http://search.yohoops.org/yohosearch/'
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/'
},
useOneapm: false,
useCache: false,
... ...
... ... @@ -2,4 +2,4 @@
<span class="iconfont checkbox checked">&#xe602;</span>
{{^}}
<span class="iconfont checkbox">&#xe601;</span>
{{/if}}
\ No newline at end of file
{{/if}}
... ...

241 Bytes | W: | H:

25.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

693 Bytes | W: | H:

1.44 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -26,6 +26,10 @@ var jQuery = require('yoho-jquery');
var ele = this;
var _checked;
if ($(ele).hasClass('disabled')) {
return;
}
options = $.extend({}, defaults, $(this).data('options'), defaultsHtml[type], options);
_checked = options.checked || $('.iconfont', this).hasClass('checked');
... ...
... ... @@ -28,6 +28,7 @@ var $addToBag = $('#add-to-bag'),
$soldOut = $('#sold-out');
var $sizeInfo = $('.size-info');
var $saleReturn = $('#saleReturn');
var $thumbCur = $('.thumb-wrap .cur'); // 当前选中展示图片
... ... @@ -38,6 +39,7 @@ var noticeFn = handlebars.compile($('#arrival-notice-tpl').html() || ''),
var thumbsLoaded = [],
id = $main.data('id'),
skn = $main.data('skn'),
introHtml;
require('yoho-jquery-nanoscroller');
... ... @@ -362,3 +364,23 @@ if ($(window).height() < 800) {
introHtml = $('#intro-full-hide').html();
chooseDefaultSize(); // 如果size只有一个则默认选中
// 特殊商品退换货
function fetchReturn() {
return $.ajax({
type: 'GET',
url: '/product/item/fetchReturn',
data: {
skn: skn
}
}).then(function(result) {
if (result.code === 200) {
if (result.data.result === 'N') {
$saleReturn.removeClass().addClass('not-support-returned-service');
}
}
});
}
fetchReturn();
... ...
... ... @@ -165,6 +165,48 @@
margin-bottom: $smallSpace;
}
}
.not-limit-txt {
color: #379ed6;
font-size: 12px;
clear: both;
cursor: pointer;
position: relative;
}
.not-limit-txt:hover {
.helper-txt {
display: block;
}
}
.helper-icon {
font-size: 14px;
color: #379ed6;
}
.helper-txt {
width: 166px;
height: 68px;
border: 2px solid #bbb;
padding: 10px 15px;
box-sizing: border-box;
position: absolute;
top: -2px;
left: 180px;
background: #fff;
display: none;
}
.helper-txt:before {
content: "";
background: url("/me/code-horn.png") no-repeat;
width: 7px;
height: 12px;
position: absolute;
left: -7px;
top: 6px;
}
}
.sub-column {
... ...
... ... @@ -80,12 +80,33 @@
}
}
.checkbox-box {
&.disabled {
.checkbox {
color: #eee;
}
}
}
.exchange-reasons {
width: 130px;
height: 28px;
padding: 0 5px;
border: 1px solid #1b1b1b;
margin-top: 35px;
&:disabled {
border-color: #eee;
color: #a2a2a2;
}
}
.iconfont {
&.checkbox {
position: relative;
top: -70px;
top: -38px;
margin-right: 10px;
font-size: 14px;
font-size: 18px;
cursor: pointer;
}
}
... ... @@ -154,6 +175,7 @@
.input-group {
margin-bottom: 10px;
}
label {
width: 75px;
display: inline-block;
... ...
... ... @@ -32,6 +32,14 @@
float: left;
width: 172px;
text-align: center;
&:last-child {
float: right;
}
}
.reason {
width: 330px;
}
.info {
... ... @@ -54,10 +62,24 @@
text-align: center;
}
.price {
float: right;
}
.reason {
width: 330px;
}
.check {
width: 56px;
}
.disabled {
.checkbox {
color: #eee;
}
}
.checkbox {
font-size: 18px;
cursor: pointer;
... ... @@ -90,6 +112,11 @@
text-align: center;
}
.num > .disabled {
background: #eee;
color: #fff;
}
.num > .iconfont {
width: 20px;
font-size: 12px;
... ... @@ -142,16 +169,22 @@
height: 28px;
padding: 0 5px;
border: 1px solid #eee;
&.disabled {
border-color: #eee;
color: #a2a2a2;
}
}
}
.limit-return-wrap {
width: 280px;
line-height: 1.5;
width: 166px;
height: 68px;
line-height: 16px;
border: 2px solid #bbb;
padding: 10px 15px;
background: #fff;
padding: 10px;
color: #1d1d1d;
border: 2px solid #bcbcbc;
position: absolute;
left: 100%;
top: -8px;
... ...
... ... @@ -509,6 +509,20 @@
line-height: 18px;
}
}
.support-returned-service {
width: 544px;
height: 23px;
margin: 35px auto;
background: url("/product/service.jpg") no-repeat;
}
.not-support-returned-service {
width: 544px;
height: 23px;
margin: 35px auto;
background: url("/product/limit.jpg") no-repeat;
}
}
}
... ...
... ... @@ -459,6 +459,25 @@
font-size: 14px;
}
.not-support-return {
font-size: 12px;
color: #797979;
clear: both;
display: block;
padding: 20px 0;
.not-return-icon {
float: left;
display: block;
width: 16px;
height: 14px;
margin-right: 5px;
background: url("/shopping/not-limit.jpg") no-repeat;
position: relative;
top: -3px;
}
}
.name {
display: inline-block;
font-size: 12px;
... ...