Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
沈志敏
9 years ago
Commit
468713ab156f5bb9c3ec82badb25f181fbc6d8cc
2 parents
514602af
96737409
Merge branch 'feature/home' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
23 deletions
apps/me/controllers/refund.js
apps/me/router.js
apps/me/views/action/status.hbs
public/js/common/intercept-click.js
public/vue/me/refund/status.vue
apps/me/controllers/refund.js
View file @
468713a
...
...
@@ -55,10 +55,24 @@ const refund = {
return
res
.
json
(
data
);
}).
catch
(
next
);
},
status
(
req
,
res
)
{
refundStatus
(
req
,
res
)
{
const
applyId
=
req
.
params
.
applyId
;
res
.
render
(
'status'
,
{
module
:
'me'
,
page
:
'status'
,
applyId
:
applyId
,
type
:
'refund'
});
},
exchangeStatus
(
req
,
res
)
{
const
applyId
=
req
.
params
.
applyId
;
res
.
render
(
'status'
,
{
module
:
'me'
,
page
:
'status'
page
:
'status'
,
applyId
:
applyId
,
type
:
'exchange'
});
},
statusDetail
(
req
,
res
,
next
)
{
...
...
apps/me/router.js
View file @
468713a
...
...
@@ -42,8 +42,9 @@ router.post('/me/del-favdel', favorite.deletefav); // 个人中心 - 收藏商
// 退换货
router
.
get
(
'/me/return'
,
refund
.
refundOrders
);
// 退换货 - 订单列表
router
.
get
(
'/me/status'
,
refund
.
status
);
// 退换货 - 状态
router
.
get
(
'/me/status-detail'
,
refund
.
statusDetail
);
// 退换货 - 状态详细信息
router
.
get
(
'/me/return/refund/detail/:applyId'
,
refund
.
refundStatus
);
// 退换货 - 退货状态
router
.
get
(
'/me/return/exchange/detail/:applyId'
,
refund
.
exchangeStatus
);
// 退换货 - 换货状态
router
.
get
(
'/me/return/status-detail'
,
refund
.
statusDetail
);
// 退换货 - 状态详细信息
router
.
get
(
'/me/return/getOrderList'
,
refund
.
getRefundOrders
);
// 退换货 - 获取订单列表数据
// 退货申请
...
...
apps/me/views/action/status.hbs
View file @
468713a
<div
class=
"status"
id=
"status"
>
<status></status>
<status
:applyid=
"
{{
applyId
}}
"
:type=
"
{{
type
}}
"
></status>
</div>
...
...
public/js/common/intercept-click.js
View file @
468713a
...
...
@@ -132,18 +132,15 @@ const matchHeader = (url) => {
return
header
;
}
if
(
/
\/
me
\/
status$/
.
test
(
path
))
{
let
des
=
''
;
let
u
=
url
.
split
(
'?'
)[
1
];
if
(
/
\/
me
\/
return
\/
refund
\/
detail/
.
test
(
path
))
{
header
=
titleMap
[
1
];
header
.
title
.
des
=
'退货状态'
;
return
header
;
}
u
=
parse
(
u
);
if
(
u
.
type
===
'refund'
)
{
des
=
'退货状态'
;
}
else
if
(
u
.
type
===
'exchange'
)
{
des
=
'换货状态'
;
}
if
(
/
\/
me
\/
return
\/
exchange
\/
detail/
.
test
(
path
))
{
header
=
titleMap
[
1
];
header
.
title
.
des
=
des
;
header
.
title
.
des
=
'换货状态'
;
return
header
;
}
...
...
public/vue/me/refund/status.vue
View file @
468713a
...
...
@@ -30,7 +30,7 @@
</div>
<div v-if="(detail.deliveryTpye === '10' || type ==='refund') && detail.status == 10"
class="logistics">
<a href="/me/return/logistics?applyid={{
orderCode
}}">填写商品寄回的快递信息</a>
<a href="/me/return/logistics?applyid={{
applyid
}}">填写商品寄回的快递信息</a>
</div>
</div>
<div class="exchange-details">
...
...
@@ -108,12 +108,12 @@
<script>
const $ = require('jquery');
const util = require('common/util');
const
qs = require('yoho-qs
');
const
yoho = require('yoho
');
module.exports = {
props: ['applyid', 'type'],
data() {
return {
type: qs.type || '',
orderCode: '',
detail: {}
};
...
...
@@ -141,8 +141,24 @@
}
}).then(function(data) {
if (data.code === 200) {
//todo
if (yoho.isApp) {
const url = '/me/return';
yoho.goNewPage({
header: {
headerid: '1',
left: {
action: ''
},
title: {
des: '退/换货',
action: ''
}
},
url: location.origin + url
});
} else {
location.href = url;
}
} else if (data.code === 400) {
tip(data.message);
} else {
...
...
@@ -155,10 +171,10 @@
let _this = this;
$.ajax({
url: '/me/status-detail',
url: '/me/
return/
status-detail',
data: {
applyid: qs.applyid || '',
type: qs.type || ''
applyid: this.applyid,
type: this.type
}
}).then(res => {
if (res.data) {
...
...
Please
register
or
login
to post a comment