From 33f2943eefe82b027300eaaf7514cbf2f971c8e9 Mon Sep 17 00:00:00 2001
From: dengj <209192278@qq.com>
Date: Mon, 20 Nov 2023 14:14:10 +0800
Subject: [PATCH] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E4=B8=8B=E6=8B=89?=
=?UTF-8?q?=E6=A1=86=E7=AD=9B=E9=80=89=E6=95=B0=E6=8D=AE=E5=92=8C=E9=87=8D?=
=?UTF-8?q?=E7=BD=AE=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 8 ++--
pages/index/NavBarPages/czxx/czxx.vue | 58 +++++++++++++++++++++++---
pages/index/NavBarPages/xmzs/xmzs.vue | 58 ++++++++++++++++++++++++--
pages/index/NavBarPages/zdxx/zdxx.vue | 58 ++++++++++++++++++++++++--
pages/index/NavBarPages/zrxx/zrxx.vue | 59 ++++++++++++++++++++++++---
5 files changed, 218 insertions(+), 23 deletions(-)
diff --git a/pages.json b/pages.json
index 363d95c..8c30514 100644
--- a/pages.json
+++ b/pages.json
@@ -127,7 +127,7 @@
"navigationBarTitleText": "转让信息",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
},
{
@@ -136,7 +136,7 @@
"navigationBarTitleText": "找店信息",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
},
{
@@ -145,7 +145,7 @@
"navigationBarTitleText": "出租信息",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
},
{
@@ -154,7 +154,7 @@
"navigationBarTitleText": "项目招商",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
},
{
diff --git a/pages/index/NavBarPages/czxx/czxx.vue b/pages/index/NavBarPages/czxx/czxx.vue
index 1784fd0..7cf139d 100644
--- a/pages/index/NavBarPages/czxx/czxx.vue
+++ b/pages/index/NavBarPages/czxx/czxx.vue
@@ -17,6 +17,10 @@
+
+ 没有符合条件的数据, 请下拉刷新重置数据~
+
+
@@ -34,25 +38,63 @@
pageNum: 1,
customQuery: {},
shopListLength: '',
+ showNull: false,
+ refresh: false
}
},
+ onPullDownRefresh() {
+ this.refresh = true
+ // if (this.showNull = true) {
+ const q = this.$u.queryParams({
+ type: 3,
+ pageSize: this.pageSize,
+ pageNum: 1,
+ })
+ // if(this.showNull=true){
+ // this.pageNum=1
+ // }
+ this.getShopList(q, "refresh")
+
+ // }
+ },
onReachBottom() {
- if (this.shopInfoList.length !== 0) {
+ if (this.shopListLength !== 0) {
this.pageNum++
this.getShopList()
console.log("触底加载");
+ }else if (this.shopListLength == 0) {
+ this.pageNum = 1
}
},
onLoad() {
this.getShopList()
},
methods: {
- getShopList(q) {
- let query = this.getQueryInfo(q)
+ getShopList(q, type) {
+ let query = {}
+ if (type == "refresh") {
+ query = q
+ } else {
+ query = this.getQueryInfo(q)
+ }
console.log("listquery", query);
this.$api.getShopList(query).then(res => {
this.shopListLength = res.data.data.length
- this.shopInfoList = [...this.shopInfoList, ...res.data.data]
+ if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
+ .includes('region') || this.refresh) {
+ console.log('筛选');
+ // this.resetQuery(q)
+ this.shopInfoList = res.data.data
+ this.refresh = false
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
+ } else {
+ console.log('查询');
+ this.shopInfoList = [...this.shopInfoList, ...res.data.data]
+ }
console.log(this.shopInfoList);
})
},
@@ -75,7 +117,13 @@
page {
background-color: #F8F8F8;
}
-
+.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 be4718d..97e4c5b 100644
--- a/pages/index/NavBarPages/xmzs/xmzs.vue
+++ b/pages/index/NavBarPages/xmzs/xmzs.vue
@@ -17,6 +17,10 @@
+
+ 没有符合条件的数据, 请下拉刷新重置数据~
+
+
@@ -34,25 +38,63 @@
pageNum: 1,
customQuery: {},
shopListLength: '',
+ showNull: false,
+ refresh: false
}
},
+ onPullDownRefresh() {
+ this.refresh = true
+ // if (this.showNull = true) {
+ const q = this.$u.queryParams({
+ type: 4,
+ pageSize: this.pageSize,
+ pageNum: 1,
+ })
+ // if(this.showNull=true){
+ // this.pageNum=1
+ // }
+ this.getShopList(q, "refresh")
+
+ // }
+ },
onReachBottom() {
- if (this.shopInfoList.length !== 0) {
+ if (!this.refresh && this.shopListLength !== 0) {
this.pageNum++
this.getShopList()
console.log("触底加载");
+ } else if (this.searchListLength == 0) {
+ this.pageNum = 1
}
},
onLoad() {
this.getShopList()
},
methods: {
- getShopList(q) {
- let query = this.getQueryInfo(q)
+ getShopList(q, type) {
+ let query = {}
+ if (type == "refresh") {
+ query = q
+ } else {
+ query = this.getQueryInfo(q)
+ }
console.log("listquery", query);
this.$api.getShopList(query).then(res => {
this.shopListLength = res.data.data.length
- this.shopInfoList = [...this.shopInfoList, ...res.data.data]
+ if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
+ .includes('region') || this.refresh) {
+ console.log('筛选');
+ // this.resetQuery(q)
+ this.shopInfoList = res.data.data
+ this.refresh = false
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
+ } else {
+ console.log('查询');
+ this.shopInfoList = [...this.shopInfoList, ...res.data.data]
+ }
console.log(this.shopInfoList);
})
},
@@ -76,6 +118,14 @@
background-color: #F8F8F8;
}
+ .showNull {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100rpx;
+ color: darkgray;
+ }
+
.marginLR10 {
margin: 0 10px;
}
diff --git a/pages/index/NavBarPages/zdxx/zdxx.vue b/pages/index/NavBarPages/zdxx/zdxx.vue
index 8f23f6c..5539882 100644
--- a/pages/index/NavBarPages/zdxx/zdxx.vue
+++ b/pages/index/NavBarPages/zdxx/zdxx.vue
@@ -17,6 +17,10 @@
+
+ 没有符合条件的数据, 请下拉刷新重置数据~
+
+
@@ -33,25 +37,63 @@
searchInfoList: [],
customQuery: {},
searchListLength: '',
+ showNull: false,
+ refresh: false
}
},
+ onPullDownRefresh() {
+ this.refresh = true
+ // if (this.showNull = true) {
+ const q = this.$u.queryParams({
+ type: 2,
+ pageSize: this.pageSize,
+ pageNum: 1,
+ })
+ // if(this.showNull=true){
+ // this.pageNum=1
+ // }
+ this.getShopList(q, "refresh")
+
+ // }
+ },
onReachBottom() {
- if (this.searchListLength !== 0) {
+ if (!this.refresh && this.searchListLength !== 0) {
this.pageNum++
this.getShopList()
console.log("触底加载");
+ } else if (this.searchListLength == 0) {
+ this.pageNum = 1
}
},
created() {
this.getShopList()
},
methods: {
- getShopList(q) {
- let query = this.getQueryInfo(q)
+ getShopList(q, type) {
+ let query = {}
+ if (type == "refresh") {
+ query = q
+ } else {
+ 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]
+ if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
+ .includes('region') || this.refresh) {
+ console.log('筛选');
+ // this.resetQuery(q)
+ this.searchInfoList = res.data.data
+ this.refresh = false
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
+ } else {
+ console.log('查询');
+ this.searchInfoList = [...this.searchInfoList, ...res.data.data]
+ }
console.log(this.searchInfoList);
})
},
@@ -75,6 +117,14 @@
background-color: #F8F8F8;
}
+ .showNull {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100rpx;
+ color: darkgray;
+ }
+
.marginLR10 {
margin: 0 10px;
}
diff --git a/pages/index/NavBarPages/zrxx/zrxx.vue b/pages/index/NavBarPages/zrxx/zrxx.vue
index c5c6a39..84c80dc 100644
--- a/pages/index/NavBarPages/zrxx/zrxx.vue
+++ b/pages/index/NavBarPages/zrxx/zrxx.vue
@@ -17,6 +17,10 @@
+
+ 没有符合条件的数据, 请下拉刷新重置数据~
+
+
@@ -33,26 +37,63 @@
pageNum: 1,
customQuery: {},
shopListLength: '',
-
+ showNull: false,
+ refresh: false
}
},
+ onPullDownRefresh() {
+ 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")
+
+ // }
+ },
onReachBottom() {
- if (this.shopInfoList.length !== 0) {
+ if (!this.refresh&&this.shopListLength !== 0) {
this.pageNum++
this.getShopList()
console.log("触底加载");
+ }else if(this.shopListLength == 0){
+ this.pageNum=1
}
},
onLoad() {
this.getShopList()
},
methods: {
- getShopList(q) {
- let query = this.getQueryInfo(q)
+ getShopList(q, type) {
+ let query = {}
+ if (type == "refresh") {
+ query = q
+ } else {
+ query = this.getQueryInfo(q)
+ }
console.log("listquery", query);
this.$api.getShopList(query).then(res => {
this.shopListLength = res.data.data.length
- this.shopInfoList = [...this.shopInfoList, ...res.data.data]
+ if (query.includes('business') || query.includes('areatype') || query.includes('sortType') || query
+ .includes('region')||this.refresh) {
+ console.log('筛选');
+ // this.resetQuery(q)
+ this.shopInfoList = res.data.data
+ this.refresh=false
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
+ } else {
+ console.log('查询');
+ this.shopInfoList = [...this.shopInfoList, ...res.data.data]
+ }
console.log(this.shopInfoList);
})
},
@@ -75,7 +116,13 @@
page {
background-color: #F8F8F8;
}
-
+.showNull {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100rpx;
+ color: darkgray;
+ }
.marginLR10 {
margin: 0 10px;
}