Authored by 沈志敏

fix bug

@@ -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: {