diff --git a/components/SearchShopListItem/SearchShopListItem.vue b/components/SearchShopListItem/SearchShopListItem.vue
index 3433e8b..e8aee94 100644
--- a/components/SearchShopListItem/SearchShopListItem.vue
+++ b/components/SearchShopListItem/SearchShopListItem.vue
@@ -220,7 +220,7 @@
display: flex;
flex-direction: column;
justify-content: space-between;
-
+ width: 100%;
>text {
font-size: 14px;
}
diff --git a/pages/shopAddress/shopAddress.vue b/pages/shopAddress/shopAddress.vue
index 9097933..7142d05 100644
--- a/pages/shopAddress/shopAddress.vue
+++ b/pages/shopAddress/shopAddress.vue
@@ -7,10 +7,10 @@
-
+
-
+
@@ -26,11 +26,44 @@
},
data() {
return {
-
+ pageSize: 5,
+ pageNum: 1,
+ searchInfoList: [],
+ customQuery: {},
+ searchListLength: '',
+ }
+ },
+ onReachBottom() {
+ if (this.searchListLength !== 0) {
+ this.pageNum++
+ this.getShopList()
+ console.log("触底加载");
}
},
methods: {
-
+ getShopList(q){
+ let query = this.getQueryInfo(q)
+ console.log("listquery",query);
+ this.$api.getShopList(query).then(res => {
+ this.searchListLength = res.data.data.length
+ this.searchInfoList = [...this.searchInfoList, ...res.data.data]
+ console.log(this.searchInfoList);
+ })
+ },
+ getQueryInfo(query){
+ console.log("getQueryInfo",query);
+ const q = this.$u.queryParams({
+ type: 2,
+ pageSize: this.pageSize,
+ pageNum: this.pageNum,
+ ...query
+ })
+ this.customQuery = q
+ return q
+ },
+ },
+ created() {
+ this.getShopList()
}
}
diff --git a/pages/shopTransfer/shopTransfer.vue b/pages/shopTransfer/shopTransfer.vue
index b92410b..2ba1528 100644
--- a/pages/shopTransfer/shopTransfer.vue
+++ b/pages/shopTransfer/shopTransfer.vue
@@ -29,24 +29,26 @@
pageSize: 5,
pageNum: 1,
shopInfoList: [],
- customQuery: {
-
- }
+ customQuery: {},
+ shopListLength: '',
+
}
},
- computed: {
-
+ onReachBottom() {
+ if (this.shopInfoList.length !== 0) {
+ this.pageNum++
+ this.getShopList()
+ console.log("触底加载");
+ }
},
methods: {
getShopList(q){
let query = this.getQueryInfo(q)
console.log("listquery",query);
this.$api.getShopList(query).then(res => {
- this.shopInfoList = res.data.data
+ this.shopListLength = res.data.data.length
+ this.shopInfoList = [...this.shopInfoList, ...res.data.data]
console.log(this.shopInfoList);
- this.shopInfoList.forEach(item=>{
- item.pics =this.$api.imgUrl + item.pics
- });
})
},
getQueryInfo(query){
@@ -60,9 +62,6 @@
this.customQuery = q
return q
},
- rePost(query){
- console.log("rePost",query);
- }
},
created() {
this.getShopList()