From 2a0144d1bd56007461a7a37826bdc67da2e753c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Tue, 28 Nov 2023 12:14:56 +0800
Subject: [PATCH] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=BB=86=E8=8A=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/InputAndSwiper/InputAndSwiper.vue | 19 +-
pages.json | 2 +-
pages/Partnerships/Partnerships.vue | 278 +++++++++----------
pages/index/NavBarPages/czxx/czxx.vue | 7 +-
pages/index/NavBarPages/xmzs/xmzs.vue | 7 +-
pages/index/NavBarPages/zdxx/zdxx.vue | 6 +
pages/index/NavBarPages/zrxx/zrxx.vue | 7 +-
pages/published/published.vue | 98 ++++++-
pages/shopAddress/shopAddress.vue | 14 +-
pages/shopTransfer/shopTransfer.vue | 28 +-
10 files changed, 296 insertions(+), 170 deletions(-)
diff --git a/components/InputAndSwiper/InputAndSwiper.vue b/components/InputAndSwiper/InputAndSwiper.vue
index 4f125a1..fb4ce65 100644
--- a/components/InputAndSwiper/InputAndSwiper.vue
+++ b/components/InputAndSwiper/InputAndSwiper.vue
@@ -53,14 +53,14 @@
options: {
styleIsolation: 'shared', // 解除样式隔离
},
- watch: {
- refresh(newVal, oldVal) {
- console.log('newVal', newVal);
- if (newVal) {
- this.keyword = ''
- }
- }
- },
+ // watch: {
+ // refresh(newVal, oldVal) {
+ // console.log('newVal', newVal);
+ // // if (newVal) {
+ // this.keyword = ''
+ // // }
+ // }
+ // },
onShow() {
if (this.type !== '0') {
this.open()
@@ -70,6 +70,9 @@
},
methods: {
+ resetInfo() {
+ this.keyword = ''
+ },
changeInput(e) {
this.$emit('getQueryInfo', e)
},
diff --git a/pages.json b/pages.json
index 8c30514..dac8b08 100644
--- a/pages.json
+++ b/pages.json
@@ -71,7 +71,7 @@
"navigationBarTitleText": "",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#339967",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
}, {
"path": "pages/publish/publishTransfer/publishTransfer",
diff --git a/pages/Partnerships/Partnerships.vue b/pages/Partnerships/Partnerships.vue
index b2a9373..bd1e17b 100644
--- a/pages/Partnerships/Partnerships.vue
+++ b/pages/Partnerships/Partnerships.vue
@@ -27,163 +27,163 @@
-
+
-
+
-
\ No newline at end of file
+ }
+
+ .left-payment {
+ display: flex;
+ flex-direction: column;
+ }
+
+ .label {
+ margin-top: 10rpx;
+ margin-left: 17rpx;
+ color: #c1c1c1;
+ /* font-size: 27rpx; */
+ }
+
\ No newline at end of file
diff --git a/pages/index/NavBarPages/czxx/czxx.vue b/pages/index/NavBarPages/czxx/czxx.vue
index 0499617..fb71c36 100644
--- a/pages/index/NavBarPages/czxx/czxx.vue
+++ b/pages/index/NavBarPages/czxx/czxx.vue
@@ -59,7 +59,7 @@
// }
this.getShopList(q, "refresh")
this.$refs.dropdown.resetInfo()
-
+ this.keyword = ''
// }
},
onReachBottom() {
@@ -90,6 +90,11 @@
this.$api.getShopList(q).then(res => {
this.shopListLength = res.data.data.length
this.shopInfoList = res.data.data
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
})
},
getShopList(q, type) {
diff --git a/pages/index/NavBarPages/xmzs/xmzs.vue b/pages/index/NavBarPages/xmzs/xmzs.vue
index 8524488..640a025 100644
--- a/pages/index/NavBarPages/xmzs/xmzs.vue
+++ b/pages/index/NavBarPages/xmzs/xmzs.vue
@@ -59,7 +59,7 @@
// }
this.getShopList(q, "refresh")
this.$refs.dropdown.resetInfo()
-
+ this.keyword = ''
// }
},
onReachBottom() {
@@ -90,6 +90,11 @@
this.$api.getShopList(q).then(res => {
this.shopListLength = res.data.data.length
this.shopInfoList = res.data.data
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
})
},
getShopList(q, type) {
diff --git a/pages/index/NavBarPages/zdxx/zdxx.vue b/pages/index/NavBarPages/zdxx/zdxx.vue
index 0a18742..177643f 100644
--- a/pages/index/NavBarPages/zdxx/zdxx.vue
+++ b/pages/index/NavBarPages/zdxx/zdxx.vue
@@ -58,6 +58,7 @@
// }
this.getShopList(q, "refresh")
this.$refs.dropdown.resetInfo()
+ this.keyword = ''
// }
},
onReachBottom() {
@@ -88,6 +89,11 @@
this.$api.getShopList(q).then(res => {
this.searchListLength = res.data.data.length
this.searchInfoList = res.data.data
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
})
},
getShopList(q, type) {
diff --git a/pages/index/NavBarPages/zrxx/zrxx.vue b/pages/index/NavBarPages/zrxx/zrxx.vue
index ce114ee..56fd96e 100644
--- a/pages/index/NavBarPages/zrxx/zrxx.vue
+++ b/pages/index/NavBarPages/zrxx/zrxx.vue
@@ -58,7 +58,7 @@
// }
this.getShopList(q, "refresh")
this.$refs.dropdown.resetInfo()
-
+ this.keyword = ''
// }
},
onReachBottom() {
@@ -89,6 +89,11 @@
this.$api.getShopList(q).then(res => {
this.shopListLength = res.data.data.length
this.shopInfoList = res.data.data
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
})
},
getShopList(q, type) {
diff --git a/pages/published/published.vue b/pages/published/published.vue
index f7d7801..256e835 100644
--- a/pages/published/published.vue
+++ b/pages/published/published.vue
@@ -1,10 +1,10 @@
-
+
-
+
@@ -22,6 +22,10 @@
@delItem="handleDel" @updateItem="handleUpdate4">
+
+ 没有符合条件的数据, 请下拉刷新重置数据~
+
+
@@ -40,18 +44,79 @@
pageNum: 1,
matchPageSize: 5,
matchPageNum: 1,
+ keyword: '',
+ refresh: false,
+ showNull: false,
}
},
+ onPullDownRefresh() {
+ console.log('this.listId', this.listId);
+ this.refresh = true
+ if (this.listId !== 4) {
+ this.getMyPublished(this.listId + 1, this.pageSize, this.pageNum)
+ } else {
+ this.getMatch()
+ }
+ this.keyword = ''
+ },
onReachBottom() {
- if (this.listId !== 4 && this.searchListLength !== 0) {
+ if (this.listId !== 4 && !this.refresh && this.searchListLength !== 0) {
this.pageNum++
this.getMyPublished(this.listId + 1, this.pageSize, this.pageNum)
} else if (this.listId == 4 && this.matchListLength !== 0) {
this.matchPageNum++
this.getMatch()
+ } else if (this.searchListLength == 0) {
+ this.pageNum = 1
}
+ this.keyword = ''
},
methods: {
+ getInput(val) {
+ console.log('搜索值', val);
+ if (this.pageNum !== 1) {
+ this.pageNum = 1
+ }
+ if (this.listId !== 4) {
+ this.$api.getMyPublished({
+ type: this.listId + 1,
+ pageSize: this.pageSize,
+ pageNum: this.pageNum,
+ title: val
+ }).then(res => {
+ console.log('发布信息', res);
+ if (res.data.code == 1) {
+ this.searchListLength = res.data.data.length
+ this.searchInfoList = res.data.data
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
+ } else {
+ uni.$u.toast(res.data.msg)
+ }
+ })
+ } else {
+ this.$api.getMyMatch({
+ pageSize: this.matchPageSize,
+ pageNum: this.matchPageNum,
+ title: val
+ }).then(res => {
+ if (res.data.code == 1) {
+ this.matchListLength = res.data.data.length
+ this.matchList = res.data.data[0]
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
+ } else {
+ uni.$u.toast(res.data.msg)
+ }
+ })
+ }
+ },
handleUpdate1(searchid) {
console.log('页面更新');
uni.navigateTo({
@@ -114,6 +179,7 @@
if (res.data.code == 1) {
this.matchListLength = res.data.data.length
this.matchList = [...this.matchList, ...res.data.data[0]]
+ uni.stopPullDownRefresh()
} else {
uni.$u.toast(res.data.msg)
}
@@ -125,14 +191,21 @@
pageSize: pageSize,
pageNum: pageNum
}).then(res => {
- console.log('发布信息', res);
+ console.log('发布信息l', res, res.data.data.length);
if (res.data.code == 1) {
this.searchListLength = res.data.data.length
if (isDelete == 1) {
this.searchInfoList = res.data.data
+ this.refresh = false
+ if (res.data.data.length == 0) {
+ this.showNull = true
+ } else {
+ this.showNull = false
+ }
} else {
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
}
+ uni.stopPullDownRefresh()
} else {
uni.$u.toast(res.data.msg)
}
@@ -176,6 +249,20 @@