From 39eb7d1b04e01d992f599c8d2b647cee42c1006b Mon Sep 17 00:00:00 2001 From: unknown <331404948@qq.com> Date: Tue, 5 Dec 2023 18:37:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E5=91=98=E8=AF=84=E5=88=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/commentItem/commentItem.vue | 4 ++-- pages/login/login.vue | 15 +++++++++++---- pages/tabbar/examSimulation/comp/studentComment.vue | 16 +++++++++------- pages/tabbar/examSimulation/index.vue | 10 +++++++++- 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/components/commentItem/commentItem.vue b/components/commentItem/commentItem.vue index 3799ce0..2b53caa 100644 --- a/components/commentItem/commentItem.vue +++ b/components/commentItem/commentItem.vue @@ -7,8 +7,8 @@ {{ $u.timeFormat(item.createTime, 'yyyy-mm-dd')}} - - {{item.stars}}分 + + {{ item.stars?item.stars.toFixed(1):0 }}分 {{item.description}} - + @@ -65,6 +65,9 @@ this.tenantPageFn() this.roleObj = this.$store.state.user.vuex_role }, + onPullDownRefresh() { + this.tenantPageFn() + }, computed: { btnHighlight() { @@ -73,6 +76,10 @@ } }, methods: { + tenantClick() { + if(!this.columnsArea.length) return this.$u.toast('没有获得服务地区,请下拉刷新重新加载') + this.show = true + }, selectClick(item) { this.showRole = false this.chooseIdentity(item.name) @@ -103,7 +110,7 @@ status: 0 } const {data: res} = await tenantPage(obj) - this.columnsArea.push(res.list) + this.columnsArea = [res.list] console.log(res) }, // 是否选择协议 diff --git a/pages/tabbar/examSimulation/comp/studentComment.vue b/pages/tabbar/examSimulation/comp/studentComment.vue index 0446312..e038728 100644 --- a/pages/tabbar/examSimulation/comp/studentComment.vue +++ b/pages/tabbar/examSimulation/comp/studentComment.vue @@ -13,12 +13,12 @@ 有视频(6) - + - + @@ -58,12 +58,13 @@ this.coachCommentPageFn() }, - onReachBottom() { - if(this.total>this.list.length) { - this.coachCommentPageFn() - } - }, + methods: { + loadMore() { + if(this.total>this.list.length) { + this.coachCommentPageFn() + } + }, searchFn(val) { this.params.studentName = val this.initList() @@ -109,6 +110,7 @@ .card { padding: 28rpx; margin-bottom: 20rpx; + } .tabs { display: flex; diff --git a/pages/tabbar/examSimulation/index.vue b/pages/tabbar/examSimulation/index.vue index 1c90bc4..0d9f499 100644 --- a/pages/tabbar/examSimulation/index.vue +++ b/pages/tabbar/examSimulation/index.vue @@ -5,7 +5,7 @@ - + @@ -23,6 +23,14 @@ onShow() { uni.hideTabBar(); }, + onPullDownRefresh() { + this.$refs.studentCommentRef.initList() + }, + onReachBottom() { + if(identity=='模拟器老师') { + this.$refs.studentCommentRef.loadMore() + } + }, }