Authored by 石坚

camel个人中心退换货

@@ -151,7 +151,7 @@ const _convertAddress = (addressList, createTime) => { @@ -151,7 +151,7 @@ const _convertAddress = (addressList, createTime) => {
151 }; 151 };
152 152
153 address.time = addr.acceptTime; 153 address.time = addr.acceptTime;
154 - addr = addr.acceptAddress.split(' '); 154 + addr = addr.accept_address.split(' ');
155 155
156 if (addr.length > 1 && /市/.test(addr[0])) { 156 if (addr.length > 1 && /市/.test(addr[0])) {
157 address.city = addr[0].replace('市', ''); 157 address.city = addr[0].replace('市', '');
@@ -81,7 +81,7 @@ const getUserReturn = (uid, page) => { @@ -81,7 +81,7 @@ const getUserReturn = (uid, page) => {
81 let paginationOpts = false; 81 let paginationOpts = false;
82 82
83 if (result && result.data) { 83 if (result && result.data) {
84 - data = camelCase(result.data); 84 + data = result.data;// camelCase(result.data);
85 85
86 paginationOpts = data.total > pageSize ? { 86 paginationOpts = data.total > pageSize ? {
87 paginationOpts: { 87 paginationOpts: {
@@ -93,20 +93,20 @@ const getUserReturn = (uid, page) => { @@ -93,20 +93,20 @@ const getUserReturn = (uid, page) => {
93 93
94 data.list.forEach(item => { 94 data.list.forEach(item => {
95 item.orderGoods = item.goods; 95 item.orderGoods = item.goods;
96 - item.createTime = item.orderCreateTime; 96 + item.createTime = item.order_create_time;
97 item.hidePrice = true; 97 item.hidePrice = true;
98 item.showStatus = true; 98 item.showStatus = true;
99 - item.refundStr = refundStr[item.refundType];  
100 - item.detailUrl = helpers.urlFormat(urlIndex[item.refundType], { 99 + item.refundStr = refundStr[item.refund_type];
  100 + item.detailUrl = helpers.urlFormat(urlIndex[item.refund_type], {
101 orderCode: item.id 101 orderCode: item.id
102 }); 102 });
103 - item.type = typeIndex[item.refundType]; 103 + item.type = typeIndex[item.refund_type];
104 104
105 item.orderGoods.forEach(good => { 105 item.orderGoods.forEach(good => {
106 - let cnAlphabet = good.cnAlphabet ? good.cnAlphabet : ''; 106 + let cnAlphabet = good.cn_alphabet ? good.cn_alphabet : '';
107 107
108 good.hidePrice = true; 108 good.hidePrice = true;
109 - good.goodUrl = helpers.urlFormat(`/product/pro_${good.productId}_${good.goodsId}/${cnAlphabet}.html`); // eslint-disable-line 109 + good.goodUrl = helpers.urlFormat(`/product/pro_${good.product_id}_${good.goods_id}/${cnAlphabet}.html`); // eslint-disable-line
110 }); 110 });
111 }); 111 });
112 } 112 }
@@ -615,12 +615,12 @@ const getChangeGoodsList = (orderCode, uid) => { @@ -615,12 +615,12 @@ const getChangeGoodsList = (orderCode, uid) => {
615 * @return { Object } 模板渲染换货数据 615 * @return { Object } 模板渲染换货数据
616 */ 616 */
617 const _setExchangeDetailData = (data) => { 617 const _setExchangeDetailData = (data) => {
618 - data = camelCase(data); 618 + // data = camelCase(data);
619 let list = {}; 619 let list = {};
620 620
621 switch (data.status) { 621 switch (data.status) {
622 case 0: 622 case 0:
623 - if (data.deliveryTpyeName === '寄回换货') { 623 + if (data.delivery_tpye_name === '寄回换货') {
624 Object.assign(list, { 624 Object.assign(list, {
625 audit: true, 625 audit: true,
626 reminder: true, 626 reminder: true,
@@ -646,7 +646,7 @@ const _setExchangeDetailData = (data) => { @@ -646,7 +646,7 @@ const _setExchangeDetailData = (data) => {
646 location: true 646 location: true
647 }); 647 });
648 648
649 - if (data.deliveryTpyeName === '寄回换货') { 649 + if (data.delivery_tpye_name === '寄回换货') {
650 Object.assign(list, { 650 Object.assign(list, {
651 logistics: true, 651 logistics: true,
652 sendBack: true, 652 sendBack: true,
@@ -660,7 +660,7 @@ const _setExchangeDetailData = (data) => { @@ -660,7 +660,7 @@ const _setExchangeDetailData = (data) => {
660 660
661 break; 661 break;
662 case 20: 662 case 20:
663 - if (data.deliveryTpyeName === '寄回换货') { 663 + if (data.delivery_tpye_name === '寄回换货') {
664 Object.assign(list, { 664 Object.assign(list, {
665 logistics: true 665 logistics: true
666 }); 666 });
@@ -669,15 +669,15 @@ const _setExchangeDetailData = (data) => { @@ -669,15 +669,15 @@ const _setExchangeDetailData = (data) => {
669 list.reminder = true; 669 list.reminder = true;
670 list.inDoor = true; 670 list.inDoor = true;
671 list.auditSuccess = true; 671 list.auditSuccess = true;
672 - list.view = `/me/order/detail/?orderCode=${data.orderCode}`; 672 + list.view = `/me/order/detail/?orderCode=${data.order_code}`;
673 } 673 }
674 674
675 break; 675 break;
676 case 30: 676 case 30:
677 - if (data.deliveryTpyeName === '寄回换货') { 677 + if (data.delivery_tpye_name === '寄回换货') {
678 list.takeGoods = true; 678 list.takeGoods = true;
679 list.auditSuccess = true; 679 list.auditSuccess = true;
680 - list.view = `/me/order/detail/?orderCode=${data.orderCode}`; 680 + list.view = `/me/order/detail/?orderCode=${data.order_code}`;
681 } else { 681 } else {
682 list.takeGoods = true; 682 list.takeGoods = true;
683 } 683 }
@@ -687,14 +687,14 @@ const _setExchangeDetailData = (data) => { @@ -687,14 +687,14 @@ const _setExchangeDetailData = (data) => {
687 send: true, 687 send: true,
688 doubt: true, 688 doubt: true,
689 auditSuccess: true, 689 auditSuccess: true,
690 - view: `/me/order/detail/?orderCode=${data.orderCode}` 690 + view: `/me/order/detail/?orderCode=${data.order_code}`
691 }); 691 });
692 break; 692 break;
693 case 40: 693 case 40:
694 Object.assign(list, { 694 Object.assign(list, {
695 finish: true, 695 finish: true,
696 auditSuccess: true, 696 auditSuccess: true,
697 - view: `/me/order/detail/?orderCode=${data.orderCode}` 697 + view: `/me/order/detail/?orderCode=${data.order_code}`
698 }); 698 });
699 break; 699 break;
700 case 91: 700 case 91:
@@ -746,7 +746,7 @@ const getExchangeDetailData = (id, uid) => { @@ -746,7 +746,7 @@ const getExchangeDetailData = (id, uid) => {
746 exchangeData.exchangeDetail, 746 exchangeData.exchangeDetail,
747 _setReturnStatus(data.statusList), 747 _setReturnStatus(data.statusList),
748 _setExchangeDetailData(data), 748 _setExchangeDetailData(data),
749 - camelCase(data) 749 + data// camelCase(data)
750 ); 750 );
751 } 751 }
752 752
@@ -135,21 +135,21 @@ @@ -135,21 +135,21 @@
135 </div> 135 </div>
136 136
137 <div class="table"> 137 <div class="table">
138 - {{# goodsList}} 138 + {{# goods_list}}
139 <div class="table-body"> 139 <div class="table-body">
140 <div class="goods-info"> 140 <div class="goods-info">
141 - <img src="{{image goodsImage 70 90}}"> 141 + <img src="{{image goods_image 70 90}}">
142 <div class="info"> 142 <div class="info">
143 - <p class="good-name">{{productName}}</p>  
144 - <p>颜色:{{colorName}}&nbsp;尺码:{{sizeName}}</p> 143 + <p class="good-name">{{product_name}}</p>
  144 + <p>颜色:{{color_name}}&nbsp;尺码:{{size_name}}</p>
145 <p>{{num}}</p> 145 <p>{{num}}</p>
146 </div> 146 </div>
147 </div> 147 </div>
148 <div class="common special-border"> 148 <div class="common special-border">
149 - <p class="reason">{{reasonName}}</p> 149 + <p class="reason">{{reason_name}}</p>
150 </div> 150 </div>
151 <div class="common special-border operation"> 151 <div class="common special-border operation">
152 - <p class="subtext">color: {{newColorName}}<br>size: {{newSizeName}}</p> 152 + <p class="subtext">color: {{new_color_name}}<br>size: {{new_size_name}}</p>
153 </div> 153 </div>
154 </div> 154 </div>
155 {{#if evidenceImages}} 155 {{#if evidenceImages}}
@@ -166,7 +166,7 @@ @@ -166,7 +166,7 @@
166 </div> 166 </div>
167 </div> 167 </div>
168 {{/if}} 168 {{/if}}
169 - {{/ goodsList}} 169 + {{/ goods_list}}
170 </div> 170 </div>
171 </div> 171 </div>
172 </div> 172 </div>
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <div class="table-body"> 16 <div class="table-body">
17 {{> order/goods-box}} 17 {{> order/goods-box}}
18 <div class="common-column special-border"> 18 <div class="common-column special-border">
19 - <p class="refund-status">{{statusName}}</p> 19 + <p class="refund-status">{{status_name}}</p>
20 <p class="subtext badge refund-type">{{refundStr}}</p> 20 <p class="subtext badge refund-type">{{refundStr}}</p>
21 </div> 21 </div>
22 <div class="common-column special-border operation"> 22 <div class="common-column special-border operation">
@@ -22,9 +22,12 @@ module.exports = { @@ -22,9 +22,12 @@ module.exports = {
22 }, 22 },
23 cookieDomain: 'yohoblk.com', 23 cookieDomain: 'yohoblk.com',
24 domains: { 24 domains: {
25 - singleApi: 'http://single.yoho.cn/',  
26 - api: 'http://api.yoho.yohoops.org/',  
27 - service: 'http://service.yoho.yohoops.org/', 25 + // singleApi: 'http://single.yoho.cn/',
  26 + // api: 'http://api.yoho.yohoops.org/',
  27 + // service: 'http://service.yoho.yohoops.org/',
  28 + api: 'http://dev-api.yohops.com:9999/',
  29 + service: 'http://dev-service.yohops.com:9999/',
  30 + singleApi: 'http://192.168.102.27:8092/',
28 search: 'http://search.yohoops.org/yohosearch/' 31 search: 'http://search.yohoops.org/yohosearch/'
29 }, 32 },
30 useOneapm: false, 33 useOneapm: false,