128 lines
2.5 KiB
Plaintext
128 lines
2.5 KiB
Plaintext
<!-- AI监测系统主页 - UTSJSONObject 优化版本 -->
|
||
<template>
|
||
<view class="sport-container">
|
||
<view class="header">
|
||
<text class="title">AI监测系统</text>
|
||
<text class="subtitle">健康体魄,由我做起</text>
|
||
</view>
|
||
|
||
<view class="content"> <view class="role-cards">
|
||
<view class="role-card teacher-card" @click="navigateToTeacher">
|
||
<view class="card-icon">
|
||
<text class="icon-text"></text>
|
||
</view>
|
||
<text class="card-title">教师端</text>
|
||
<text class="card-desc">项目管理、作业布置、数据分析</text>
|
||
</view>
|
||
|
||
<view class="role-card student-card" @click="navigateToStudent">
|
||
<view class="card-icon">
|
||
<text class="icon-text">♂️</text>
|
||
</view>
|
||
<text class="card-title">学生端</text>
|
||
<text class="card-desc">训练记录、进度跟踪、自我评估</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup lang="uts">
|
||
const navigateToTeacher = () => {
|
||
uni.navigateTo({
|
||
url: '/pages/sport/teacher/dashboard'
|
||
})
|
||
}
|
||
|
||
const navigateToStudent = () => {
|
||
uni.navigateTo({
|
||
url: '/pages/sport/student/dashboard'
|
||
})
|
||
}
|
||
</script>
|
||
|
||
<style> .sport-container {
|
||
min-height: 100vh;
|
||
background-image: linear-gradient(to bottom right, #667eea, #764ba2);
|
||
padding: 60rpx 40rpx;
|
||
}
|
||
.header {
|
||
margin-bottom: 80rpx;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
}
|
||
|
||
.title {
|
||
font-size: 48rpx;
|
||
font-weight: bold;
|
||
color: #ffffff;
|
||
margin-bottom: 16rpx;
|
||
}
|
||
|
||
.subtitle {
|
||
font-size: 28rpx;
|
||
color: rgba(255, 255, 255, 0.8);
|
||
}
|
||
|
||
.content {
|
||
display: flex;
|
||
justify-content: center;
|
||
}
|
||
.role-cards {
|
||
display: flex;
|
||
flex-direction: row;
|
||
max-width: 800rpx;
|
||
}
|
||
.role-cards .role-card {
|
||
margin-right: 40rpx;
|
||
}
|
||
|
||
@media screen and (max-width: 768px) {
|
||
.role-cards {
|
||
flex-direction: column;
|
||
}
|
||
}
|
||
.role-card {
|
||
flex: 1;
|
||
background: #ffffff;
|
||
border-radius: 24rpx;
|
||
padding: 60rpx 40rpx;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
||
transition: transform 0.3s ease;
|
||
}
|
||
.card-icon {
|
||
margin-bottom: 32rpx;
|
||
display: flex;
|
||
justify-content: center;
|
||
}
|
||
|
||
.icon-text {
|
||
font-size: 80rpx;
|
||
}
|
||
|
||
.card-title {
|
||
font-size: 36rpx;
|
||
font-weight: bold;
|
||
color: #333333;
|
||
margin-bottom: 16rpx;
|
||
}
|
||
|
||
.card-desc {
|
||
font-size: 28rpx;
|
||
color: #666666;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.teacher-card {
|
||
border-left: 8rpx solid #007aff;
|
||
}
|
||
|
||
.student-card {
|
||
border-left: 8rpx solid #34c759;
|
||
}
|
||
</style>
|