新增资产权证转让管理部分页面增加分页
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
价格
|
||||
<image
|
||||
class="icon"
|
||||
mode="widthFix" :src="require(marketType == 'low' ? '@/static/icons/market_icon_low.png': '@/static/icons/market_icon_high.png')"
|
||||
mode="widthFix" :src="require(marketType == 'asc' ? '@/static/icons/market_icon_low.png': '@/static/icons/market_icon_high.png')"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -23,27 +23,33 @@
|
||||
data() {
|
||||
return {
|
||||
tabIndex : 0,
|
||||
marketType : 'low',
|
||||
marketType : 'asc',
|
||||
goods : []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
list().then(res=>{
|
||||
console.log(res.data)
|
||||
this.goods = res.data
|
||||
this.pages = res.page
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
onTabs(e){
|
||||
let index = e.target.dataset.index
|
||||
if(index == 0 && index == this.tabIndex) return
|
||||
if(index == 1 && index == this.tabIndex) this.marketType = this.marketType == 'low' ? 'high': 'low'
|
||||
if(index == 1 && index == this.tabIndex) this.marketType = this.marketType == 'asc' ? 'desc': 'asc'
|
||||
this.tabIndex = index
|
||||
this.getList()
|
||||
},
|
||||
|
||||
onGoods(e){
|
||||
this.$Router.push({name: 'goodsDetails', params: {id: e.goods_id}})
|
||||
},
|
||||
|
||||
getList(){
|
||||
list({
|
||||
order_by: this.tabIndex == 1 ? this.marketType: ''
|
||||
}).then(res=>{
|
||||
this.goods = res.data
|
||||
this.pages = res.page
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user