From a61c0723923ac6e1e8a872917beae5588789b094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Tue, 23 Jul 2024 17:34:42 +0800 Subject: [PATCH] =?UTF-8?q?task=20=E4=B9=B3=E5=B1=B1=E4=BA=A7=E4=BA=A4=20?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E6=8C=87=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/news/index.vue | 92 +++++++++++++++++++++++++++++++++------- 1 file changed, 77 insertions(+), 15 deletions(-) diff --git a/src/views/news/index.vue b/src/views/news/index.vue index 578bed68..79f6c204 100644 --- a/src/views/news/index.vue +++ b/src/views/news/index.vue @@ -7,21 +7,48 @@ placeholder @click-left="onClickLeft" /> - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -35,8 +62,14 @@ export default { loading: false, //是否滚动到底部 finished: false, + //是否显示加载 + secondLoading: false, + //是否滚动到底部 + secondFinished: false, //新闻集合 newList:[], + //交易规则集合 + secondList:[], //查询参数 queryParams: { pageNum: 1, @@ -44,6 +77,13 @@ export default { deptId:100, number:2 }, + //交易规则查询参数 + querySecondParams: { + deptId:100, + pageNum:1, + pageSize:10, + number:9 + }, }; }, created() {}, @@ -70,6 +110,28 @@ export default { this.loading = false; }); }, + getSecondList(){ + this.loading = true; + newList(this.querySecondParams).then(response => { + console.log(response); + for (var i = 0; i < response.rows.length; i++) { + this.secondList.push(response.rows[i]); + var imgStrs = response.rows[i].content.match(//gi) + if (imgStrs != null && imgStrs != '') { + console.log(imgStrs[0].length-2) + console.log(imgStrs[0]) + this.secondList[i].img = imgStrs[0].substr(10,(imgStrs[0].length-12)); + } + } + console.log(this.secondList) + if(this.secondList.length >= response.total){ + this.secondFinished = true; + return; + } + this.querySecondParams.pageNum += 1 ; + this.secondLoading = false; + }); + }, }, };