Compare commits
2 Commits
d40c61efd2
...
639fa29412
Author | SHA1 | Date | |
---|---|---|---|
![]() |
639fa29412 | ||
![]() |
a5eca7fdac |
@ -8,8 +8,9 @@
|
|||||||
<view style="padding: 10rpx 30rpx">
|
<view style="padding: 10rpx 30rpx">
|
||||||
<u-subsection :list="list" :current="curNow" @change="sectionChange"></u-subsection>
|
<u-subsection :list="list" :current="curNow" @change="sectionChange"></u-subsection>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view :style="{ height: scrollHeight + 'px' }" scroll-y="true" class="scroll-view" @scrolltolower="onReachBottomCus"
|
<scroll-view :style="{ height: scrollHeight + 'px' }" scroll-y="true" class="scroll-view"
|
||||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered" v-if="appointmentList.length > 0">
|
@scrolltolower="onReachBottomCus" refresher-enabled @refresherrefresh="onRefresherrefresh"
|
||||||
|
:refresher-triggered="isTriggered" v-if="appointmentList.length > 0">
|
||||||
<!-- 新增内容容器 -->
|
<!-- 新增内容容器 -->
|
||||||
<view class="box_2 flex-col" v-if="curNow === 0">
|
<view class="box_2 flex-col" v-if="curNow === 0">
|
||||||
<view class="box_4 flex-col" v-for="item in appointmentList" @click="goDetail(item,'')" :key="item.id">
|
<view class="box_4 flex-col" v-for="item in appointmentList" @click="goDetail(item,'')" :key="item.id">
|
||||||
@ -41,38 +42,37 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 新增内容容器 -->
|
<!-- 新增内容容器 -->
|
||||||
<view class="box_2 flex-col" v-if="curNow === 1">
|
<view class="box_2 flex-col" v-if="curNow === 1">
|
||||||
<view class="box_4 flex-col" v-for="item in appointmentList"
|
<view class="box_4 flex-col" v-for="item in appointmentList" :key="item.id">
|
||||||
:key="item.id">
|
|
||||||
<view @click="goDetail(item,'train')">
|
<view @click="goDetail(item,'train')">
|
||||||
<view class="group_5 flex-row justify-between">
|
<view class="group_5 flex-row justify-between">
|
||||||
<view class="block_3 flex-col justify-between">
|
<view class="block_3 flex-col justify-between">
|
||||||
<text class="text_2">{{ item.trainDay }}</text>
|
<text class="text_2">{{ item.trainDay }}</text>
|
||||||
<view class="group_6 flex-row justify-between">
|
<view class="group_6 flex-row justify-between">
|
||||||
<view class="text-wrapper_1 flex-col">
|
<view class="text-wrapper_1 flex-col">
|
||||||
<text class="text_3">{{ subjectArr[item.subject - 1] }}</text>
|
<text class="text_3">{{ subjectArr[item.subject - 1] }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-wrapper_2 flex-col">
|
<view class="text-wrapper_2 flex-col">
|
||||||
<text class="text_4">{{ item.courseType }}</text>
|
<text class="text_4">{{ item.courseType }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="text-wrapper_4 flex-row justify-between">
|
||||||
<view class="text-wrapper_4 flex-row justify-between">
|
<text class="text_6">交通方式:</text>
|
||||||
<text class="text_6">交通方式:</text>
|
<text class="text_7">{{ item.transWay == null ? '' : item.transWay}}</text>
|
||||||
<text class="text_7">{{ item.transWay }}</text>
|
</view>
|
||||||
</view>
|
<view class="text-wrapper_4 flex-row justify-between">
|
||||||
<view class="text-wrapper_4 flex-row justify-between">
|
<text class="text_6">训练地址:</text>
|
||||||
<text class="text_6">训练地址:</text>
|
<text class="text_7">{{ item.addr == null ? '' : item.addr }}</text>
|
||||||
<text class="text_7">{{ item.addr }}</text>
|
</view>
|
||||||
</view>
|
<view class="text-wrapper_4 flex-row justify-between">
|
||||||
<view class="text-wrapper_4 flex-row justify-between">
|
<text class="text_6">训练时长:</text>
|
||||||
<text class="text_6">训练时长:</text>
|
<text class="text_7">{{ item.trainTime }}分钟</text>
|
||||||
<text class="text_7">{{ item.trainTime }}分钟</text>
|
</view>
|
||||||
</view>
|
<view class="text-wrapper_5 flex-row justify-between">
|
||||||
<view class="text-wrapper_5 flex-row justify-between">
|
<text class="text_8">教练名称:</text>
|
||||||
<text class="text_8">教练名称:</text>
|
<text class="text_9">{{ item.coachName }}</text>
|
||||||
<text class="text_9">{{ item.coachName }}</text>
|
</view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="block_5 box_10 flex-row" style="justify-content: flex-end; margin: 0 20rpx 15rpx 0;"
|
<view class="block_5 box_10 flex-row" style="justify-content: flex-end; margin: 0 20rpx 15rpx 0;"
|
||||||
v-if="!item.ifEvaluate" @click="goEvaluateAdd(item)">
|
v-if="!item.ifEvaluate" @click="goEvaluateAdd(item)">
|
||||||
@ -84,14 +84,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="empty-container" v-else>
|
<view class="empty-container" v-else>
|
||||||
<u-empty
|
<u-empty mode="data" />
|
||||||
mode="data"
|
</view>
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
<view class="box_6 flex-col bottom_">
|
<view class="box_6 flex-col bottom_">
|
||||||
<view class="text-wrapper_12 flex-col " @click="goAppointment()">
|
<view class="text-wrapper_12 flex-col " @click="goAppointment()">
|
||||||
<text class="text_19">预约</text>
|
<text class="text_19">预约</text>
|
||||||
</view>
|
</view>
|
||||||
@ -133,8 +131,8 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
// 动态计算滚动区域高度
|
// 动态计算滚动区域高度
|
||||||
this.calculateScrollHeight();
|
this.calculateScrollHeight();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goback() {
|
goback() {
|
||||||
@ -199,14 +197,14 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
calculateScrollHeight() {
|
calculateScrollHeight() {
|
||||||
// 获取屏幕高度
|
// 获取屏幕高度
|
||||||
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
||||||
// 获取顶部区域高度(头部+分段选择器)
|
// 获取顶部区域高度(头部+分段选择器)
|
||||||
const topHeight = 138; // 140rpx转换为px
|
const topHeight = 138; // 140rpx转换为px
|
||||||
// 获取底部按钮高度(假设约100rpx)
|
// 获取底部按钮高度(假设约100rpx)
|
||||||
const bottomHeight = uni.upx2px(120);
|
const bottomHeight = uni.upx2px(120);
|
||||||
// 计算滚动区域高度
|
// 计算滚动区域高度
|
||||||
this.scrollHeight = screenHeight - topHeight - bottomHeight;
|
this.scrollHeight = screenHeight - topHeight - bottomHeight;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 上滑加载数据
|
* 上滑加载数据
|
||||||
@ -301,11 +299,14 @@
|
|||||||
margin: 8rpx 0 0 12rpx;
|
margin: 8rpx 0 0 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.empty-container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center; /* 水平居中 */
|
|
||||||
align-items: center; /* 垂直居中 */
|
|
||||||
height: 100vh; /* 或者你需要撑满的高度 */
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
.empty-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
/* 水平居中 */
|
||||||
|
align-items: center;
|
||||||
|
/* 垂直居中 */
|
||||||
|
height: 100vh;
|
||||||
|
/* 或者你需要撑满的高度 */
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user