Authored by 陈轩

fix

... ... @@ -8,6 +8,3 @@ require('common/vue-filter');
Vue.use(lazyload);
new Vue(exchange);
// Global variable: 全局常量 只允许读, 不允许写!!!!!!! exchange created的时候设置
global.store = {};
... ...
... ... @@ -101,17 +101,13 @@
this.$set('goodsArr', res.data.goodsList);
this.$set('exchangeData', res.data);
this.$set('address', res.data.address);
// 全局只读变量 放入 全局对象
const arr = [];
res.data.specialExchangeReason.forEach(obj => arr.push(obj.id));
reasonConfig.specialReasons = [];
res.data.specialExchangeReason.forEach(obj => reasonConfig.specialReasons.push(obj.id));
reasonConfig.reasons = [{
id: 0,
name: '请选择'
}].concat(res.data.exchangeReason);
reasonConfig.specialReasons = arr;
reasonConfig.specialNotice = res.data.specialNoticeBo;
}
});
... ...
... ... @@ -54,6 +54,7 @@
const modal = require('common/modal');
const productList = require('me/return/list.vue');
const reasonConfig = require('me/return/reason');
module.exports = {
data() {
... ... @@ -110,13 +111,13 @@
}
});
global.store = {};
global.store.reasons = [{
reasonConfig.specialReasons = [];
res.data.specialExchangeReason.forEach(obj => reasonConfig.specialReasons.push(obj.id));
reasonConfig.reasons = [{
id: 0,
name: '请选择'
}].concat(res.data.returnReason);
global.store.specialReasons = res.data.specialReturnReason.map(obj => obj.id);
global.store.specialNotice = res.data.specialNotice;
}].concat(res.data.exchangeReason);
reasonConfig.specialNotice = res.data.specialNoticeBo;
this.list = res.data.goodsList;
this.$set('refundData', res.data);
... ...
... ... @@ -27,8 +27,7 @@
el: '#product-search',
data: function() {
return {
orderConfig: global.orderConfig,
filterConfig: global.filterConfig,
orderConfig: [],
// query
url: '/search.json',
... ...