Authored by yyq

Merge branch 'feature/return' of git.yoho.cn:fe/yoho-blk into feature/return

... ... @@ -86,11 +86,32 @@ const exchange = (req, res, next) => {
next();
};
const detailExchange = (req, res) => {
// const uid = global.yoho.uid || '8050560';
// const page = req.query.page;
res.display('index', {
page: 'exchange-detail',
isMe: true,
content: {
nav: mcHandler.getMeCrumb('我的退/换货'),
navigation: mcHandler.getSideMenu('我的退/换货'),
banner: 'http://placehold.it/{width}x{height}'
// exchange: {
// }
}
});
};
module.exports = {
index,
detail,
refund,
refundApply,
refundDetail,
exchange
exchange,
detailExchange
};
... ...
... ... @@ -31,6 +31,7 @@ router.get('/return', returns.index);
router.get('/return/refund/:orderCode', returns.refund);
router.get('/return/exchange/:orderCode', returns.exchange);
router.get('/return/refund/detail/:applyId', returns.refundDetail);
router.get('/return/exchange/detail', returns.detailExchange);
router.get('/return/:returnId', returns.detail);
router.post('/return/refund/apply', returns.refundApply);
... ...
... ... @@ -36,6 +36,11 @@
{{> returns}}
{{/if}}
{{!-- 换货详情 --}}
{{#if exchange}}
{{> exchange-detail}}
{{/if}}
{{!-- 我的退换货列表 --}}
{{#if returnsList}}
{{> returns-list}}
... ...
{{!-- {{# exchange}} --}}
<div class="exchange-detail-page">
<p class="state"><span class="iconfont">&#xe618;</span>换货申请审核中</p>
<div class="way">
<p class="way-title">您已选择{{way}}</p>
<p>请将商品连同吊牌、包装、发货单(如无发货单,您可找张白纸上注明订单编号,收货人姓名及手机号码)、发票(如有)、赠品(如有)一并保存,
如有遗漏将影响您的退换货进度,敬请谅解
</p>
<p class="cancel">如果您不想换货了,您可以<span class="cancel-btn">取消申请</span></p>
</div>
<div class="adress">
<p class="adress-title">收货地址<span class="modify-btn">修改</span></p>
<div class="adress-detail">
<p>所在区域:江苏省 南京市 雨花台区</p>
<p>收 货 人:赵四</p>
<p>详细地址:西善桥北路 109 号</p>
<p>联系电话:17714194699</p>
</div>
</div>
<div class="good-info">
<div class="table">
<ul class="header">
<li class="info">商品信息</li>
<li class="st">换货原因</li>
<li class="op">换货信息</li>
</ul>
</div>
<div class="table">
<div class="table-body">
<div class="goods-info">
<img class="lazy" data-original="{{image img 70 90}}">
<div class="info">
<p class="good-name">{{!-- {{name}} --}}fdefwfwefwrefverfref</p>
<p>颜色:{{color}}&nbsp;尺码:{{size}}</p>
<p>×{{num}}</p>
</div>
</div>
<div class="common-column special-border">
<p class="reason">{{reason}}发错货</p>
</div>
<div class="common-column special-border operation">
<p class="subtext">color: 蓝色<br>size: M</p>
</div>
</div>
<div class="reason-info">
<span>问题描述:太小了</span>
<div class="reason-img">照片凭证:
<div class="evidence">
<img src="{{image img 70 90}}">
</div>
</div>
</div>
</div>
</div>
</div>
{{!-- {{/ exchange}} --}}
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@
{{> refund}}
{{> refund-detail}}
{{> exchange}}
{{/ returns}}
</div>
</div>
... ...
var $ = require('yoho-jquery'),
lazyLoad = require('yoho-jquery-lazyload');
require('../common/header');
require('../common/return-top');
lazyLoad($('.content-msg img.lazy'));
$('.editorial-list-page').on('click', '.like-icon', function() {
var $this = $(this),
msgId = $this.closest('.msg-content').data('id'),
url;
$this.toggleClass('liked');
if ($this.hasClass('liked')) {
url = '/editorial/info/cancelPraise';
} else {
url = '/editorial/info/praise';
}
$.ajax({
type: 'GET',
url: url,
data: {
id: msgId,
time: new Date().getTime()
}
}).then(function(data) {
if (data.code === 200) {
$this.next('b').removeClass('num-0').children('.num').html(data.data);
}
// if (data.code === 200) {
// if (data.data * 1 === 0) {
// $this.next('b').addClass('num-0').children('.num').html('0'); // 隐藏数字显示
// } else {
// console.log(data.data)
// $this.next('b').removeClass('num-0').children('.num').html(data.data);
// }
// }
// prising = false;
});
}).on('mouseenter mouseleave', '.like-icon', function() {
$(this).closest('.like').toggleClass('hover');
});
... ...
.exchange-detail-page {
.state {
font-size: 16px;
color: #5cb0de;
span {
font-size: 20px;
margin-right: 5px;
}
}
.way {
font-size: 14px;
border-bottom: 1px solid #eee;
.way-title {
margin-top: 10px;
font-weight: bold;
height: 40px;
line-height: 35px;
}
p {
line-height: 22px;
height: 22px;
}
.cancel {
display: block;
margin-top: 18px;
width: 220px;
height: 50px;
line-height: 50px;
font-size: 12px;
}
.cancel-btn {
float: right;
display: block;
height: 25px;
width: 70px;
background: #1b1b1b;
color: #fff;
line-height: 25px;
text-align: center;
margin-top: 10px;
}
}
.adress {
overflow: hidden;
margin-top: 30px;
font-size: 14px;
border-bottom: 1px solid #eee;
.adress-title {
display: block;
font-size: 16px;
width: 125px;
height: 40px;
line-height: 40px;
}
.modify-btn {
font-size: 12px;
float: right;
display: block;
height: 20px;
width: 40px;
line-height: 20px;
text-align: center;
margin-top: 10px;
border: 1px solid #eee;
}
.adress-detail {
margin-bottom: 15px;
p {
display: block;
height: 25px;
line-height: 25px;
}
}
}
.table {
width: 100%;
.header {
height: 40px;
line-height: 40px;
padding-left: 20px;
font-size: 14px;
background-color: #f5f5f5;
border: 1px solid #f1f1f1;
li {
height: 100%;
float: left;
text-align: center;
}
.info {
width: 496px;
text-align: left;
}
.st,
.op {
width: 206px;
}
}
}
.table-body {
display: table;
font-size: 14px;
border: 1px solid #f1f1f1;
}
.goods-info {
width: 516px;
display: inline-block;
box-sizing: border-box;
border-top: none;
font-weight: normal;
img {
width: 70px;
height: 90px;
display: inline-block;
box-sizing: border-box;
margin: 30px 20px;
}
.info {
width: 400px;
padding: 30px 8px 0 0;
float: right;
box-sizing: border-box;
line-height: 1.4;
font-size: 14px;
color: #616161;
}
.good-name {
margin-bottom: 8px;
}
}
.common-column {
width: 208px;
display: table-cell;
text-align: center;
vertical-align: top;
padding-top: 30px;
position: relative;
}
.subtext {
display: inline-block;
line-height: 30px;
}
.reason {
display: inline-block;
margin-top: 20px;
}
.reason-info {
overflow: hidden;
padding: 25px 0 0 20px;
width: 100%;
border: 1px solid #eee;
border-top: none;
img {
float: left;
width: 70px;
height: 90px;
}
span {
line-height: 25px;
height: 25px;
display: block;
}
}
.reason-img {
margin-top: 5px;
}
.evidence {
width: 825px;
overflow: hidden;
float: right;
}
}
... ...
... ... @@ -106,3 +106,4 @@
@import "return/index";
@import "currency";
@import "returns";
@import "exchange";
... ...