From b0e2af62e365fe75d7ab4b73ae25b7e7bea32c19 Mon Sep 17 00:00:00 2001 From: xyc <3422692813@qq.com> Date: Thu, 17 Apr 2025 10:02:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- newPages/schoolDetail/index.vue | 17 +- pages/index/contract.vue | 2 +- pagesA/courseDetail/index.vue | 298 ++++++++++++++++---------------- pagesA/register/index.vue | 8 +- 4 files changed, 168 insertions(+), 157 deletions(-) diff --git a/newPages/schoolDetail/index.vue b/newPages/schoolDetail/index.vue index c0babe4..7abc034 100644 --- a/newPages/schoolDetail/index.vue +++ b/newPages/schoolDetail/index.vue @@ -7,7 +7,7 @@ + :src="imagesUrl + '/' + schoolInfo.photo" v-if="schoolInfo.photo" /> @@ -276,11 +276,18 @@ // 对数据进行排序 const sortedList = res.data.records.sort((a, b) => b.seniority - a.seniority); const coachId = auth.getCoachId() + const staffType = auth.getStaffType() console.log(coachId, 'coachId'); - const coach = res.data.records.find(item => item.userId == coachId) - console.log(coach, 'coach'); - if (coach) { - this.schoolCoachList.push(coach) + if (coachId && staffType === '02') { + const coach = res.data.records.find(item => item.userId == coachId) + console.log(coach, 'coach'); + if (coach) { + this.schoolCoachList.push(coach) + } else { + // 取排序后的前三条数据 + this.schoolCoachList = sortedList.slice(0, 3); + this.total = res.data.total; + } } else { // 取排序后的前三条数据 this.schoolCoachList = sortedList.slice(0, 3); diff --git a/pages/index/contract.vue b/pages/index/contract.vue index 011b0d4..6f1e2d4 100644 --- a/pages/index/contract.vue +++ b/pages/index/contract.vue @@ -158,7 +158,7 @@ setTimeout(function() { // 在这里写需要延迟执行的代码 - uni.navigateTo({ + uni.switchTab({ url: '/newPages/newIndex/index' }) }, 2600); // 3000毫秒即为3秒 diff --git a/pagesA/courseDetail/index.vue b/pagesA/courseDetail/index.vue index 1912d1b..c90b038 100644 --- a/pagesA/courseDetail/index.vue +++ b/pagesA/courseDetail/index.vue @@ -1,157 +1,159 @@ + @import '../common/common.scss'; + @import './assets/style/index.rpx.scss'; + + .u-content { + margin-top: 20rpx; + padding: 10rpx; + } + \ No newline at end of file diff --git a/pagesA/register/index.vue b/pagesA/register/index.vue index 48ea1a3..4a58d55 100644 --- a/pagesA/register/index.vue +++ b/pagesA/register/index.vue @@ -4,7 +4,7 @@ - + @@ -248,8 +248,10 @@ this.tenantId = option.tenantId this.userinfo = getLocalUserInfo() this.localStaffType = getStaffType() - this.localCoachId = getCoachId() - console.log('localCoachId', this.localCoachId); + if (this.localStaffType === '02') { + this.localCoachId = getCoachId() + console.log('localCoachId', this.localCoachId); + } }, onShow() { this.getListAll()