Authored by 陈轩

fix

@@ -8,6 +8,3 @@ require('common/vue-filter'); @@ -8,6 +8,3 @@ require('common/vue-filter');
8 Vue.use(lazyload); 8 Vue.use(lazyload);
9 9
10 new Vue(exchange); 10 new Vue(exchange);
11 -  
12 -// Global variable: 全局常量 只允许读, 不允许写!!!!!!! exchange created的时候设置  
13 -global.store = {};  
@@ -102,16 +102,12 @@ @@ -102,16 +102,12 @@
102 this.$set('exchangeData', res.data); 102 this.$set('exchangeData', res.data);
103 this.$set('address', res.data.address); 103 this.$set('address', res.data.address);
104 104
105 - // 全局只读变量 放入 全局对象  
106 - const arr = [];  
107 -  
108 - res.data.specialExchangeReason.forEach(obj => arr.push(obj.id)); 105 + reasonConfig.specialReasons = [];
  106 + res.data.specialExchangeReason.forEach(obj => reasonConfig.specialReasons.push(obj.id));
109 reasonConfig.reasons = [{ 107 reasonConfig.reasons = [{
110 id: 0, 108 id: 0,
111 name: '请选择' 109 name: '请选择'
112 }].concat(res.data.exchangeReason); 110 }].concat(res.data.exchangeReason);
113 -  
114 - reasonConfig.specialReasons = arr;  
115 reasonConfig.specialNotice = res.data.specialNoticeBo; 111 reasonConfig.specialNotice = res.data.specialNoticeBo;
116 } 112 }
117 }); 113 });
@@ -54,6 +54,7 @@ @@ -54,6 +54,7 @@
54 const modal = require('common/modal'); 54 const modal = require('common/modal');
55 55
56 const productList = require('me/return/list.vue'); 56 const productList = require('me/return/list.vue');
  57 + const reasonConfig = require('me/return/reason');
57 58
58 module.exports = { 59 module.exports = {
59 data() { 60 data() {
@@ -110,13 +111,13 @@ @@ -110,13 +111,13 @@
110 } 111 }
111 }); 112 });
112 113
113 - global.store = {};  
114 - global.store.reasons = [{ 114 + reasonConfig.specialReasons = [];
  115 + res.data.specialExchangeReason.forEach(obj => reasonConfig.specialReasons.push(obj.id));
  116 + reasonConfig.reasons = [{
115 id: 0, 117 id: 0,
116 name: '请选择' 118 name: '请选择'
117 - }].concat(res.data.returnReason);  
118 - global.store.specialReasons = res.data.specialReturnReason.map(obj => obj.id);  
119 - global.store.specialNotice = res.data.specialNotice; 119 + }].concat(res.data.exchangeReason);
  120 + reasonConfig.specialNotice = res.data.specialNoticeBo;
120 121
121 this.list = res.data.goodsList; 122 this.list = res.data.goodsList;
122 this.$set('refundData', res.data); 123 this.$set('refundData', res.data);
@@ -27,8 +27,7 @@ @@ -27,8 +27,7 @@
27 el: '#product-search', 27 el: '#product-search',
28 data: function() { 28 data: function() {
29 return { 29 return {
30 - orderConfig: global.orderConfig,  
31 - filterConfig: global.filterConfig, 30 + orderConfig: [],
32 31
33 // query 32 // query
34 url: '/search.json', 33 url: '/search.json',