From e3dcaeb0180a4e37347ac9ceb44c8a59ae7af37f Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Mon, 21 Feb 2022 19:40:20 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
---
pages/article/article.vue | 32 +++++++++++---------------------
1 files changed, 11 insertions(+), 21 deletions(-)
diff --git a/pages/article/article.vue b/pages/article/article.vue
index f31772b..1368359 100644
--- a/pages/article/article.vue
+++ b/pages/article/article.vue
@@ -55,7 +55,7 @@
</view> -->
<!-- 底部导航条 -->
- <u-tabbar :list="tabbar" :mid-button="false"></u-tabbar>
+ <u-tabbar :list="tabbar" :mid-button="true"></u-tabbar>
</view>
</template>
@@ -70,7 +70,7 @@
// pathUrl:"http://localhost:89/",
pathUrl: this.$store.state.piAPI + "",
page: 1,
- pagesize: 10,
+ pagesize: 99999,
status: 'loadmore',
// loadStatus:'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中
@@ -173,7 +173,6 @@
query
.select('#articleBox')
.boundingClientRect(data => {
-
that.swiperHeight = (safeArea.bottom - data.top - 50);
})
@@ -184,11 +183,12 @@
//上拉加载更多
onReachBottom() {
+ console.log(2323232)
if (this.status == 'nomore') return;
this.page = ++this.page;
setTimeout(() => {
this.getArtcilePageList(this.tabInfo);
- }, 1000);
+ }, 100);
},
methods: {
goTabDetail(index) {
@@ -237,24 +237,23 @@
}
}
uni.request({
- url: this.$store.state.piAPI + '/article/article/pageDate',
+ url: that.$store.state.piAPI + '/article/article/pageDate',
method: 'GET',
data: paramData,
success: (res) => {
if (res.data.code == 200) {
-
if (res.data.data.records) {
//如果总数小于pageSize,不做其他操作
- if (res.data.data.total < this.pagesize) {
+ if (res.data.data.total < that.pagesize) {
that.data = res.data.data.records;
that.status = 'nomore';
} else {
- if (res.data.data.records.length < this.pagesize) {
+ if (res.data.data.records.length < that.pagesize) {
//如果数量小于分页数量,则为最后一页
- this.status = 'nomore'
- } else {
+ that.status = 'nomore'
+ } else {
//否则继续加载更多数据
- this.status = 'loading';
+ that.status = 'loading';
}
res.data.data.records.forEach((item) => {
that.data.push(item);
@@ -274,7 +273,6 @@
this.getArtcilePageList(e);
},
refreshing() {
-
if (this.isRefreshing) {
return;
}
@@ -283,10 +281,6 @@
if (!this.triggered) {
this.triggered = true;
}
-
- this.dataListP = [];
- this.dataListQZ = [];
- this.dataListTXL = [];
this.getArtcilePageList();
},
@@ -299,11 +293,7 @@
</script>
<style>
- page {
- width: 100%;
- height: 100%;
- background-color: #f7f7f7;
- }
+
</style>
<style lang="scss" scoped>
--
Gitblit v1.9.3