|
|
@@ -5,8 +5,8 @@
|
|
|
<div class="fl"> | 产品信息(<span class="text-num"></span><span class="text-num" v-text="good_list.total"></span>)</div>
|
|
|
<div class="fr">
|
|
|
<div @click="sortBy('normal1')" :class="activeTag==='normal1'?'active':''"><a >综合排序</a></div>
|
|
|
- <div @click="sortBy('normal2')" :class="activeTag==='normal2'?'active':''"><a >现货优选</a></div>
|
|
|
- <div @click="sortBy('type')" :class="activeTag==='type'?'active':''"><a >型号精确</a></div>
|
|
|
+ <div @click="sortBy('normal2')" :class="activeTag==='normal2'?'active':''"><a >现货优选<i class="fa fa-long-arrow-down" v-show="reserve_asc"></i><i class="fa fa-long-arrow-up" v-show="!reserve_asc"></i></a></div>
|
|
|
+ <!--<div @click="sortBy('type')" :class="activeTag==='type'?'active':''"><a >型号精确</a></div>-->
|
|
|
<div style="display:none"><a href="">销量</a></div>
|
|
|
<div style="display:none"><a href="">人气</a></div>
|
|
|
<div style="display:none"><a href="">信用</a></div>
|
|
|
@@ -169,6 +169,7 @@
|
|
|
pageSize: 15,
|
|
|
sorting: {},
|
|
|
price_asc: true,
|
|
|
+ reserve_asc: true,
|
|
|
min_price: '',
|
|
|
max_price: '',
|
|
|
filter: {},
|
|
|
@@ -230,24 +231,30 @@
|
|
|
},
|
|
|
sortBy: function (param) {
|
|
|
if (param === 'normal1') {
|
|
|
- this.sorting = {'GO_SEARCH': 'DESC', 'GO_RESERVE': 'DESC'}
|
|
|
+ this.sorting = {}
|
|
|
this.activeTag = 'normal1'
|
|
|
} else if (param === 'normal2') {
|
|
|
- this.sorting = {'GO_RESERVE': 'DESC', 'GO_SEARCH': 'DESC'}
|
|
|
+ if (this.reserve_asc) {
|
|
|
+ this.sorting = {'RESERVE': 'ASC'}
|
|
|
+ } else {
|
|
|
+ this.sorting = {'RESERVE': 'DESC'}
|
|
|
+ }
|
|
|
this.activeTag = 'normal2'
|
|
|
+ this.reserve_asc = !this.reserve_asc
|
|
|
} else if (param === 'type') {
|
|
|
- this.sorting = {'GO_SEARCH': 'DESC', 'GO_RESERVE': 'DESC'}
|
|
|
+ this.sorting = {'RESERVE': 'DESC'}
|
|
|
this.activeTag = 'type'
|
|
|
} else if (param === 'price') {
|
|
|
if (this.price_asc) {
|
|
|
- this.sorting = {'GO_MINPRICERMB': 'ASC', 'GO_RESERVE': 'DESC', 'GO_SEARCH': 'DESC'}
|
|
|
+ this.sorting = {'PRICE': 'ASC'}
|
|
|
} else {
|
|
|
- this.sorting = {'GO_MINPRICERMB': 'DESC', 'GO_RESERVE': 'DESC', 'GO_SEARCH': 'DESC'}
|
|
|
+ this.sorting = {'PRICE': 'DESC'}
|
|
|
}
|
|
|
this.activeTag = 'price'
|
|
|
this.price_asc = !this.price_asc
|
|
|
}
|
|
|
this.$emit('sortEvent', this.sorting)
|
|
|
+ this.nowPage = 1
|
|
|
},
|
|
|
filter_price: function () {
|
|
|
if (this.min_price === '' && this.max_price !== '') {
|