Showing
4 changed files
with
10 additions
and
17 deletions
@@ -101,17 +101,13 @@ | @@ -101,17 +101,13 @@ | ||
101 | this.$set('goodsArr', res.data.goodsList); | 101 | this.$set('goodsArr', res.data.goodsList); |
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 | - | ||
105 | - // 全局只读变量 放入 全局对象 | ||
106 | - const arr = []; | ||
107 | - | ||
108 | - res.data.specialExchangeReason.forEach(obj => arr.push(obj.id)); | 104 | + |
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', |
-
Please register or login to post a comment