邓洁:轮播图
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="root">
|
||||
<InputAndSwiper @getQueryInfo="getInput"></InputAndSwiper>
|
||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList"></InputAndSwiper>
|
||||
|
||||
<view>
|
||||
<view class="dropdown-bug">
|
||||
@@ -32,6 +32,7 @@
|
||||
pageSize: 3,
|
||||
pageNum: 1,
|
||||
searchInfoList: [],
|
||||
swiperList: [],
|
||||
customQuery: {},
|
||||
searchListLength: '',
|
||||
showNull: false,
|
||||
@@ -62,7 +63,20 @@
|
||||
this.pageNum = 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getShopList()
|
||||
this.getBanner()
|
||||
},
|
||||
methods: {
|
||||
getBanner() {
|
||||
this.$api.getBanner().then(res => {
|
||||
res.data.data.forEach(item => {
|
||||
item.img = this.$api.imgUrl + item.img
|
||||
})
|
||||
this.swiperList = res.data.data
|
||||
// .map(item => this.$api.imgUrl + item.img)
|
||||
})
|
||||
},
|
||||
getInput(val) {
|
||||
console.log('搜索值', val);
|
||||
if (this.pageNum !== 1) {
|
||||
@@ -118,10 +132,8 @@
|
||||
})
|
||||
return q
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getShopList()
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="root">
|
||||
<InputAndSwiper @getQueryInfo="getInput"></InputAndSwiper>
|
||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList"> </InputAndSwiper>
|
||||
|
||||
<view>
|
||||
<view class="dropdown-bug">
|
||||
@@ -33,6 +33,7 @@
|
||||
pageNum: 1,
|
||||
shopInfoList: [],
|
||||
customQuery: {},
|
||||
swiperList: [],
|
||||
shopListLength: '',
|
||||
showNull: false,
|
||||
refresh: false
|
||||
@@ -57,12 +58,26 @@
|
||||
if (!this.refresh && this.shopListLength !== 0) {
|
||||
this.pageNum++
|
||||
this.getShopList()
|
||||
|
||||
console.log("触底加载");
|
||||
} else if (this.shopListLength == 0) {
|
||||
this.pageNum = 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getShopList()
|
||||
this.getBanner()
|
||||
},
|
||||
methods: {
|
||||
getBanner() {
|
||||
this.$api.getBanner().then(res => {
|
||||
res.data.data.forEach(item => {
|
||||
item.img = this.$api.imgUrl + item.img
|
||||
})
|
||||
this.swiperList = res.data.data
|
||||
// .map(item => this.$api.imgUrl + item.img)
|
||||
})
|
||||
},
|
||||
getInput(val) {
|
||||
console.log('搜索值', val);
|
||||
if (this.pageNum !== 1) {
|
||||
@@ -117,9 +132,6 @@
|
||||
})
|
||||
return q
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getShopList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user