Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop
Showing
4 changed files
with
24 additions
and
5 deletions
@@ -10,7 +10,10 @@ const testUid = 8039837; // 测试uid | @@ -10,7 +10,10 @@ const testUid = 8039837; // 测试uid | ||
10 | 10 | ||
11 | const refund = { | 11 | const refund = { |
12 | refund(req, res) { | 12 | refund(req, res) { |
13 | - res.render('refund'); | 13 | + res.render('refund', { |
14 | + module: 'me', | ||
15 | + page: 'refund' | ||
16 | + }); | ||
14 | }, | 17 | }, |
15 | order(req, res, next) { | 18 | order(req, res, next) { |
16 | const uid = req.user.uid || 8050882; | 19 | const uid = req.user.uid || 8050882; |
@@ -53,7 +53,7 @@ exports.cancelOrder = (orderCode, reasonId, reason) => { | @@ -53,7 +53,7 @@ exports.cancelOrder = (orderCode, reasonId, reason) => { | ||
53 | method: 'app.SpaceOrders.close', | 53 | method: 'app.SpaceOrders.close', |
54 | order_code: orderCode, | 54 | order_code: orderCode, |
55 | reason_id: reasonId, | 55 | reason_id: reasonId, |
56 | - reason: reason | 56 | + reason: reason ? reason : '' |
57 | }); | 57 | }); |
58 | }; | 58 | }; |
59 | 59 |
@@ -130,6 +130,20 @@ const matchHeader = (path, qs, titleMap) => { | @@ -130,6 +130,20 @@ const matchHeader = (path, qs, titleMap) => { | ||
130 | return header; | 130 | return header; |
131 | } | 131 | } |
132 | 132 | ||
133 | + if (/\/me\/return\/refund$/.test(path)) { | ||
134 | + header = titleMap[3]; | ||
135 | + header.title.des = '退货申请'; | ||
136 | + header.right.action = 'submitForm'; | ||
137 | + return header; | ||
138 | + } | ||
139 | + | ||
140 | + if (/\/me\/return\/exchange$/.test(path)) { | ||
141 | + header = titleMap[3]; | ||
142 | + header.title.des = '换货申请'; | ||
143 | + header.right.action = 'submitForm'; | ||
144 | + return header; | ||
145 | + } | ||
146 | + | ||
133 | if (/\/me\/return\/refund\/detail/.test(path)) { | 147 | if (/\/me\/return\/refund\/detail/.test(path)) { |
134 | header = titleMap[1]; | 148 | header = titleMap[1]; |
135 | header.title.des = '退货状态'; | 149 | header.title.des = '退货状态'; |
@@ -93,6 +93,8 @@ | @@ -93,6 +93,8 @@ | ||
93 | } | 93 | } |
94 | }, | 94 | }, |
95 | created() { | 95 | created() { |
96 | + yoho.addNativeMethod('submitForm', this.submit.bind(this)); | ||
97 | + | ||
96 | $.ajax({ | 98 | $.ajax({ |
97 | url: '/me/return/refund/order', | 99 | url: '/me/return/refund/order', |
98 | data: { | 100 | data: { |
@@ -114,12 +116,12 @@ | @@ -114,12 +116,12 @@ | ||
114 | }); | 116 | }); |
115 | 117 | ||
116 | reasonConfig.specialReasons = []; | 118 | reasonConfig.specialReasons = []; |
117 | - res.data.specialExchangeReason.forEach(obj => reasonConfig.specialReasons.push(obj.id)); | 119 | + res.data.specialReturnReason.forEach(obj => reasonConfig.specialReasons.push(obj.id)); |
118 | reasonConfig.reasons = [{ | 120 | reasonConfig.reasons = [{ |
119 | id: 0, | 121 | id: 0, |
120 | name: '请选择' | 122 | name: '请选择' |
121 | - }].concat(res.data.exchangeReason); | ||
122 | - reasonConfig.specialNotice = res.data.specialNoticeBo; | 123 | + }].concat(res.data.returnReason); |
124 | + reasonConfig.specialNotice = res.data.specialNotice; | ||
123 | 125 | ||
124 | this.list = res.data.goodsList; | 126 | this.list = res.data.goodsList; |
125 | this.$set('refundData', res.data); | 127 | this.$set('refundData', res.data); |
-
Please register or login to post a comment