From b8165c73e9b6280923ede8cd9b403c8d6836bce0 Mon Sep 17 00:00:00 2001 From: zyn Date: Thu, 14 Sep 2023 10:39:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=AB=AF-=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=8C=96=E5=8A=A8=E6=80=81-=E8=B5=84=E6=96=99=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E6=90=9C=E7=B4=A2=E6=8D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/phone/standDynamics.vue | 39 ++++++++++++++++++------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/pages/phone/standDynamics.vue b/src/pages/phone/standDynamics.vue index 9affe344c..62c9cea99 100644 --- a/src/pages/phone/standDynamics.vue +++ b/src/pages/phone/standDynamics.vue @@ -77,7 +77,7 @@
取消
-
+
加载中...
@@ -173,12 +173,11 @@ export default { } }, scroolThree() { - this.scrolled = this.$refs.cardBoxTwo.scrollTop; - console.log(this.$refs.cardBoxTwo.scrollTop); + this.scrolled = this.$refs.cardBoxThree.scrollTop; //获得可视区的高度 - const windowHeight = this.$refs.cardBoxTwo.clientHeight; + const windowHeight = this.$refs.cardBoxThree.clientHeight; //获取滚动条的总高度 - const scrollHeight = this.$refs.cardBoxTwo.scrollHeight; + const scrollHeight = this.$refs.cardBoxThree.scrollHeight; let windowScrolled = this.scrolled + windowHeight; if (scrollHeight - windowScrolled < 100 && this.scrolled !== 0) { //把距离顶部的距离加上可视区域的高度 @@ -233,37 +232,37 @@ export default { this.standList = []; this.standardReleaseList = []; if (this.messageType == "ZLZX") { - this.getAdvice(); + this.getAdvice(true); } else { this.onDynamics(); } }, //获取数据 - getAdvice() { - this.$http.get("fileMaterialCenter/file-material/getFileMaterialIndex", { - page: this.page, + getAdvice(first = false) { + this.listFlag = false; + this.$http.get("fileMaterialCenter/file-material", { + page: first ? 1 : this.page, pageSize: 10, treeId: this.currentSearch.id || '' }, { _this: this, loading: "loading" }, res => { if (res.ok) { - let mList = res.data; + let mList = res.data.records || []; if (mList.length) { - if (this.standardReleaseList.length) { + if (!first && this.standardReleaseList.length) { this.standardReleaseList = this.standardReleaseList.concat(mList); } else { this.standardReleaseList = mList; } - this.loading = false; } else { - this.loading = false; + this.standardReleaseList = []; this.listFlag = true; } } else { this.standardReleaseList = []; - this.loading = false; } + this.loading = false; }, e => { this.standardReleaseList = []; this.total = 0; @@ -310,11 +309,11 @@ export default { }, onCancel () { this.$set(this, 'currentSearch', {}) - this.getAdvice() + this.getAdvice(true) }, setChecked (currentData) { this.currentSearch = currentData - this.getAdvice() + this.getAdvice(true) } }, mounted() { @@ -398,6 +397,14 @@ export default { } + .card-box-three { + height: calc(85% - 54px); + position: relative; + overflow-x: hidden; + overflow-y: scroll; + top: 10px; + } + .card-content { width: 95%; height: auto;