罗世杰:fixed:修改列表组件发送网络请求的位置
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
|
||||
</view>
|
||||
<view class="marginLR10">
|
||||
<DropDown></DropDown>
|
||||
<DropDown :getQueryInfo = "setQueryInfo" @changeDrop="getShopList"></DropDown>
|
||||
</view>
|
||||
<view class="marginLR10">
|
||||
<ShowShopList :showStyle="1"></ShowShopList>
|
||||
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList"></ShowShopList>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -26,11 +26,37 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
pageSize: 5,
|
||||
pageNum: 1,
|
||||
shopInfoList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getShopList(){
|
||||
let query = this.getQueryInfo()
|
||||
console.log("query",query);
|
||||
this.$api.getShopList(query).then(res => {
|
||||
this.shopInfoList = res.data.data
|
||||
console.log(this.shopInfoList);
|
||||
this.shopInfoList.forEach(item=>{
|
||||
item.pics =this.$api.imgUrl + item.pics
|
||||
});
|
||||
})
|
||||
},
|
||||
getQueryInfo(query){
|
||||
return this.$u.queryParams({
|
||||
type: 1,
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum,
|
||||
...query
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getShopList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user