From aaee754194571c970de8b51b0d5feb48381edcf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com> Date: Mon, 20 Nov 2023 20:11:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/NavBarPages/czxx/czxx.vue | 9 ++-- pages/index/NavBarPages/xmzs/xmzs.vue | 1 + pages/index/NavBarPages/zdxx/zdxx.vue | 1 + pages/index/NavBarPages/zrxx/zrxx.vue | 37 +++++++++-------- pages/shopAddress/shopAddress.vue | 60 ++++++++++++++------------- pages/shopTransfer/shopTransfer.vue | 34 +++++++-------- 6 files changed, 77 insertions(+), 65 deletions(-) diff --git a/pages/index/NavBarPages/czxx/czxx.vue b/pages/index/NavBarPages/czxx/czxx.vue index 7cf139d..784124e 100644 --- a/pages/index/NavBarPages/czxx/czxx.vue +++ b/pages/index/NavBarPages/czxx/czxx.vue @@ -54,7 +54,7 @@ // this.pageNum=1 // } this.getShopList(q, "refresh") - + // } }, onReachBottom() { @@ -62,7 +62,7 @@ this.pageNum++ this.getShopList() console.log("触底加载"); - }else if (this.shopListLength == 0) { + } else if (this.shopListLength == 0) { this.pageNum = 1 } }, @@ -95,6 +95,7 @@ console.log('查询'); this.shopInfoList = [...this.shopInfoList, ...res.data.data] } + uni.stopPullDownRefresh() console.log(this.shopInfoList); }) }, @@ -117,13 +118,15 @@ page { background-color: #F8F8F8; } -.showNull { + + .showNull { display: flex; align-items: center; justify-content: center; height: 100rpx; color: darkgray; } + .marginLR10 { margin: 0 10px; } diff --git a/pages/index/NavBarPages/xmzs/xmzs.vue b/pages/index/NavBarPages/xmzs/xmzs.vue index 97e4c5b..9abde82 100644 --- a/pages/index/NavBarPages/xmzs/xmzs.vue +++ b/pages/index/NavBarPages/xmzs/xmzs.vue @@ -95,6 +95,7 @@ console.log('查询'); this.shopInfoList = [...this.shopInfoList, ...res.data.data] } + uni.stopPullDownRefresh() console.log(this.shopInfoList); }) }, diff --git a/pages/index/NavBarPages/zdxx/zdxx.vue b/pages/index/NavBarPages/zdxx/zdxx.vue index 5539882..c88697f 100644 --- a/pages/index/NavBarPages/zdxx/zdxx.vue +++ b/pages/index/NavBarPages/zdxx/zdxx.vue @@ -94,6 +94,7 @@ console.log('查询'); this.searchInfoList = [...this.searchInfoList, ...res.data.data] } + uni.stopPullDownRefresh() console.log(this.searchInfoList); }) }, diff --git a/pages/index/NavBarPages/zrxx/zrxx.vue b/pages/index/NavBarPages/zrxx/zrxx.vue index 84c80dc..c90e74f 100644 --- a/pages/index/NavBarPages/zrxx/zrxx.vue +++ b/pages/index/NavBarPages/zrxx/zrxx.vue @@ -42,27 +42,27 @@ } }, onPullDownRefresh() { - this.refresh=true + this.refresh = true // if (this.showNull = true) { - const q = this.$u.queryParams({ - type: 1, - pageSize: this.pageSize, - pageNum: 1, - }) - // if(this.showNull=true){ - // this.pageNum=1 - // } - this.getShopList(q, "refresh") - + const q = this.$u.queryParams({ + type: 1, + pageSize: this.pageSize, + pageNum: 1, + }) + // if(this.showNull=true){ + // this.pageNum=1 + // } + this.getShopList(q, "refresh") + // } }, onReachBottom() { - if (!this.refresh&&this.shopListLength !== 0) { + if (!this.refresh && this.shopListLength !== 0) { this.pageNum++ this.getShopList() console.log("触底加载"); - }else if(this.shopListLength == 0){ - this.pageNum=1 + } else if (this.shopListLength == 0) { + this.pageNum = 1 } }, onLoad() { @@ -80,11 +80,11 @@ this.$api.getShopList(query).then(res => { this.shopListLength = res.data.data.length if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query - .includes('region')||this.refresh) { + .includes('region') || this.refresh) { console.log('筛选'); // this.resetQuery(q) this.shopInfoList = res.data.data - this.refresh=false + this.refresh = false if (res.data.data.length == 0) { this.showNull = true } else { @@ -95,6 +95,7 @@ this.shopInfoList = [...this.shopInfoList, ...res.data.data] } console.log(this.shopInfoList); + uni.stopPullDownRefresh() }) }, getQueryInfo(query) { @@ -116,13 +117,15 @@ page { background-color: #F8F8F8; } -.showNull { + + .showNull { display: flex; align-items: center; justify-content: center; height: 100rpx; color: darkgray; } + .marginLR10 { margin: 0 10px; } diff --git a/pages/shopAddress/shopAddress.vue b/pages/shopAddress/shopAddress.vue index 5476e2f..5d8b730 100644 --- a/pages/shopAddress/shopAddress.vue +++ b/pages/shopAddress/shopAddress.vue @@ -1,16 +1,16 @@