Authored by 陈轩

fix BLK-964

@@ -27,6 +27,10 @@ @@ -27,6 +27,10 @@
27 let locationQuery = qs(decodeURIComponent(location.search.replace(/^\?/, ''))); 27 let locationQuery = qs(decodeURIComponent(location.search.replace(/^\?/, '')));
28 let hasSort = !!locationQuery.sort; 28 let hasSort = !!locationQuery.sort;
29 29
  30 + const aliasMap = {
  31 + groupSort: 'sort'
  32 + };
  33 +
30 module.exports = { 34 module.exports = {
31 props: { 35 props: {
32 config: Object, 36 config: Object,
@@ -97,13 +101,14 @@ @@ -97,13 +101,14 @@
97 setParams: function(item) { 101 setParams: function(item) {
98 let sortType = this.subType; 102 let sortType = this.subType;
99 103
100 - if (this.subType === 'groupSort') {  
101 - sortType = 'sort';  
102 - } 104 + aliasMap[this.subType] && (sortType = aliasMap[this.subType]);
  105 +
103 this.$set(`params.${sortType}`, item); 106 this.$set(`params.${sortType}`, item);
104 }, 107 },
105 108
106 showLabel: function(key) { 109 showLabel: function(key) {
  110 + aliasMap[key] && (key = aliasMap[key]);
  111 +
107 const newSelected = this.params[key]; 112 const newSelected = this.params[key];
108 const oldSelected = this.selected[key]; 113 const oldSelected = this.selected[key];
109 114
@@ -114,24 +119,6 @@ @@ -114,24 +119,6 @@
114 } 119 }
115 } 120 }
116 }, 121 },
117 - filters: {  
118 - unifyTxt: function(val, category) {  
119 - let txt = '';  
120 - let arr = [];  
121 - let foo = $.noop;  
122 -  
123 -  
124 - if ($.isArray(val)) { // [{categoryName,..},{}..]  
125 - foo = (index, obj) => {  
126 - arr.push(obj[category + 'Name']);  
127 - };  
128 - }  
129 -  
130 - $.each(val, foo);  
131 - txt = arr.join(',');  
132 - return txt;  
133 - }  
134 - },  
135 created() { 122 created() {
136 const self = this; 123 const self = this;
137 124
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <li class="card" v-for="item in data"> 4 <li class="card" v-for="item in data">
5 <div class="card-pic"> 5 <div class="card-pic">
6 <a href="{{item.productId | goodsUrl}}"> 6 <a href="{{item.productId | goodsUrl}}">
7 - <img v-lazy="item.goodsList[0].imagesUrl | resize 372 499" alt="{{item.productName}}"> 7 + <img v-lazy="item.defaultImages | resize 372 499" alt="{{item.productName}}">
8 </a> 8 </a>
9 </div> 9 </div>
10 <div class="card-bd"> 10 <div class="card-bd">