From a5eca7fdacf9d896b1ffefaf5fc48e1cd1431112 Mon Sep 17 00:00:00 2001 From: xyc <3422692813@qq.com> Date: Thu, 17 Apr 2025 18:31:41 +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 --- pagesA/appointment/index.vue | 107 ++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/pagesA/appointment/index.vue b/pagesA/appointment/index.vue index 40c53eb..bd6e93f 100644 --- a/pagesA/appointment/index.vue +++ b/pagesA/appointment/index.vue @@ -8,8 +8,9 @@ - + @@ -41,38 +42,37 @@ - + - - - {{ item.trainDay }} - - - {{ subjectArr[item.subject - 1] }} - - - {{ item.courseType }} + + + {{ item.trainDay }} + + + {{ subjectArr[item.subject - 1] }} + + + {{ item.courseType }} + - - - 交通方式: - {{ item.transWay }} - - - 训练地址: - {{ item.addr }} - - - 训练时长: - {{ item.trainTime }}分钟 - - - 教练名称: - {{ item.coachName }} - + + 交通方式: + {{ item.transWay == null ? '' : item.transWay}} + + + 训练地址: + {{ item.addr == null ? '' : item.addr }} + + + 训练时长: + {{ item.trainTime }}分钟 + + + 教练名称: + {{ item.coachName }} + @@ -84,14 +84,12 @@ - - - + + + - + 预约 @@ -133,8 +131,8 @@ }) }, onReady() { - // 动态计算滚动区域高度 - this.calculateScrollHeight(); + // 动态计算滚动区域高度 + this.calculateScrollHeight(); }, methods: { goback() { @@ -199,14 +197,14 @@ }) }, calculateScrollHeight() { - // 获取屏幕高度 - const screenHeight = uni.getSystemInfoSync().windowHeight; - // 获取顶部区域高度(头部+分段选择器) - const topHeight = 138; // 140rpx转换为px - // 获取底部按钮高度(假设约100rpx) - const bottomHeight = uni.upx2px(120); - // 计算滚动区域高度 - this.scrollHeight = screenHeight - topHeight - bottomHeight; + // 获取屏幕高度 + const screenHeight = uni.getSystemInfoSync().windowHeight; + // 获取顶部区域高度(头部+分段选择器) + const topHeight = 138; // 140rpx转换为px + // 获取底部按钮高度(假设约100rpx) + const bottomHeight = uni.upx2px(120); + // 计算滚动区域高度 + this.scrollHeight = screenHeight - topHeight - bottomHeight; }, /** * 上滑加载数据 @@ -301,11 +299,14 @@ margin: 8rpx 0 0 12rpx; } } - .empty-container { - display: flex; - justify-content: center; /* 水平居中 */ - align-items: center; /* 垂直居中 */ - height: 100vh; /* 或者你需要撑满的高度 */ - } - + .empty-container { + display: flex; + justify-content: center; + /* 水平居中 */ + align-items: center; + /* 垂直居中 */ + height: 100vh; + /* 或者你需要撑满的高度 */ + } + \ No newline at end of file