From e879ea68d81a2028b9cfe08eb97f6135aad2fc35 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Tue, 21 Feb 2023 11:46:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=80=E9=83=A8=E6=BB=9A=E5=8A=A8=E8=A7=A6?= =?UTF-8?q?=E5=BA=95=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qujing/AppLegalLearning/classDetail.vue | 22 ++++++++++++++----- .../components/GeneralLawExam.vue | 12 +++++----- .../components/OnlineClass.vue | 11 ++++++---- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/project/qujing/AppLegalLearning/classDetail.vue b/src/project/qujing/AppLegalLearning/classDetail.vue index 4075be8..1629213 100644 --- a/src/project/qujing/AppLegalLearning/classDetail.vue +++ b/src/project/qujing/AppLegalLearning/classDetail.vue @@ -24,7 +24,7 @@

共{{ data.msgCount }}条评论

-
+
@@ -38,7 +38,7 @@
{{ item.content }}
-
+
@@ -78,6 +78,7 @@ export default { commentList: [], id: '', flag: false, + current: 1, } }, onLoad(o) { @@ -94,9 +95,15 @@ export default { }, // 评论集合 getComment() { - this.$instance.post(`/app/appcoursecomment/listByApplet?courseId=${this.data.id}`).then(res=> { + this.$instance.post(`/app/appcoursecomment/listByApplet`,null,{ + params: { + current: this.current, + size: 10, + courseId: this.data.id, + } + }).then(res=> { if(res?.data) { - this.commentList = res.data.records + this.commentList = this.current==1? res.data.records: [...this.commentList,...res.data.records] } }) }, @@ -141,7 +148,11 @@ export default { }, keyboard(e) { console.log(e.detail.height); - } + }, + scrollLower() { + this.current++ + this.getComment() + }, }, onUnload() { this.stop() @@ -247,7 +258,6 @@ export default { .comment_box { width: 100%; max-height: 60vh; - overflow: scroll; .comment_card { display: flex; padding: 24px 32px; diff --git a/src/project/qujing/AppLegalLearning/components/GeneralLawExam.vue b/src/project/qujing/AppLegalLearning/components/GeneralLawExam.vue index 64b908e..5cae700 100644 --- a/src/project/qujing/AppLegalLearning/components/GeneralLawExam.vue +++ b/src/project/qujing/AppLegalLearning/components/GeneralLawExam.vue @@ -7,7 +7,7 @@

全部考试

- +
{{ item.examinationName }}
@@ -97,7 +97,7 @@ export default { } }).then(res=> { if(res?.data) { - this.testList = res.data.records + this.testList = this.current==1? res.data.records: [...this.testList,...res.data.records] } }) }, @@ -153,12 +153,12 @@ export default { this.showAuth = false this.$u.toast(err.msg) }) + }, + scrolltLower() { + this.current++ + this.getList() } }, - onReachBottom() { - this.current++; - this.getList() - }, } diff --git a/src/project/qujing/AppLegalLearning/components/OnlineClass.vue b/src/project/qujing/AppLegalLearning/components/OnlineClass.vue index a7128ad..d315a48 100644 --- a/src/project/qujing/AppLegalLearning/components/OnlineClass.vue +++ b/src/project/qujing/AppLegalLearning/components/OnlineClass.vue @@ -7,7 +7,7 @@

全部课程

- +
@@ -48,17 +48,20 @@ export default { } }).then(res=> { if(res?.data) { - this.classList = res.data.records + this.classList = this.current==1? res.data.records: [...this.classList,...res.data.records] } }) }, handleToDetail(id) { this.$emit('toDetail',id) + }, + scrolltLower() { + this.current ++; + this.getList() } }, onReachBottom() { - this.current ++; - this.getList() + }, }