Files
gym-manage/gym-manage-uniapp/pages/train/index.vue
T

116 lines
2.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view class="tab-page">
<view class="tab-page__header">
<text class="tab-page__title">训练</text>
<text class="tab-page__subtitle">记录每一次进步</text>
</view>
<view class="train-cards">
<view class="train-card" hover-class="train-card--hover" @tap="goTrainReport">
<text class="train-card__title">训练报告</text>
<text class="train-card__desc">查看本周/本月运动数据与趋势</text>
</view>
<view class="train-card" hover-class="train-card--hover" @tap="goBodyTest">
<text class="train-card__title">智能体测</text>
<text class="train-card__desc">连接设备获取专业体测报告</text>
</view>
<view class="train-card" hover-class="train-card--hover" @tap="goBodyHistory">
<text class="train-card__title">体测报告</text>
<text class="train-card__desc">历史记录与对比分析</text>
</view>
<view class="train-card" hover-class="train-card--hover" @tap="goCheckIn">
<text class="train-card__title">签到记录</text>
<text class="train-card__desc">到店打卡与训练频次</text>
</view>
</view>
<view class="bottom-placeholder"></view>
<TabBar :active="2" />
</view>
</template>
<script setup>
import TabBar from '@/components/TabBar.vue'
import { PAGE, navigateToPage } from '@/common/constants/routes.js'
function goTrainReport() {
navigateToPage(PAGE.TRAIN_REPORT)
}
function goBodyTest() {
navigateToPage(PAGE.BODY_TEST_HOME)
}
function goBodyHistory() {
navigateToPage(PAGE.BODY_TEST_HISTORY)
}
function goCheckIn() {
navigateToPage(PAGE.CHECK_IN_HISTORY)
}
</script>
<style lang="scss" scoped>
.tab-page {
min-height: 100vh;
background: $gradient-sky;
padding-bottom: 160rpx;
}
.tab-page__header {
padding: 48rpx 32rpx 16rpx;
}
.tab-page__title {
display: block;
font-size: 40rpx;
font-weight: $font-weight-bold;
color: $text-dark;
}
.tab-page__subtitle {
display: block;
margin-top: 8rpx;
font-size: 24rpx;
color: $text-muted;
}
.train-cards {
display: flex;
flex-direction: column;
gap: 20rpx;
padding: 24rpx 32rpx;
}
.train-card {
padding: 28rpx 32rpx;
border-radius: $radius-md;
background: $bg-white;
box-shadow: $shadow-sm;
border: 1px solid $border-light;
transition: all 0.2s ease;
}
.train-card:active {
transform: scale(0.98);
}
.train-card__title {
display: block;
font-size: 30rpx;
font-weight: $font-weight-bold;
color: $text-dark;
}
.train-card__desc {
display: block;
margin-top: 8rpx;
font-size: 24rpx;
color: $text-muted;
}
.bottom-placeholder {
height: 40rpx;
}
</style>