<template>
	<view class="demo-page">
		<view class="demo-header">
			<text class="demo-title">课程页面演示1</text>
		</view>
		
		<view class="demo-content">
			<view class="demo-item" @click="goCourse">
				<view class="demo-icon">📚</view>
				<view class="demo-info">
					<text class="demo-name">肝胆相照精品课</text>
					<text class="demo-desc">100%还原设计图的课程页面</text>
				</view>
				<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
			</view>
			
			<view class="demo-item" @click="goCourseDetail">
				<view class="demo-icon">📖</view>
				<view class="demo-info">
					<text class="demo-name">课程详情页面</text>
					<text class="demo-desc">肝硬化与重症肝病课程详情</text>
				</view>
				<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
			</view>
		</view>
		
		<view class="demo-tips">
			<text class="tips-title">使用说明：</text>
			<text class="tips-text">1. 页面已完全按照设计图还原</text>
			<text class="tips-text">2. 所有交互功能已实现</text>
			<text class="tips-text">3. 需要添加对应的图片资源</text>
			<text class="tips-text">4. 可根据需求连接后端API</text>
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue'

// 响应式数据
const goCourse = () => {
	uni.navigateTo({
		url: '/pages_course/course/course'
	})
}

const goCourseDetail = () => {
	uni.navigateTo({
		url: '/pages_course/course_detail/course_detail'
	})
}
</script>

<style lang="scss">
.demo-page {
	padding: 40rpx;
	background-color: #f5f5f5;
	min-height: 100vh;
}

.demo-header {
	text-align: center;
	margin-bottom: 60rpx;
	
	.demo-title {
		font-size: 48rpx;
		font-weight: bold;
		color: #333;
	}
}

.demo-content {
	background-color: #fff;
	border-radius: 16rpx;
	overflow: hidden;
	box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1);
	margin-bottom: 40rpx;
}

.demo-item {
	padding: 40rpx;
	display: flex;
	align-items: center;
	
	.demo-icon {
		font-size: 48rpx;
		margin-right: 24rpx;
	}
	
	.demo-info {
		flex: 1;
		
		.demo-name {
			display: block;
			font-size: 32rpx;
			color: #333;
			font-weight: 500;
			margin-bottom: 8rpx;
		}
		
		.demo-desc {
			font-size: 26rpx;
			color: #666;
		}
	}
}

.demo-tips {
	background-color: #fff;
	border-radius: 16rpx;
	padding: 40rpx;
	box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1);
	
	.tips-title {
		display: block;
		font-size: 32rpx;
		color: #333;
		font-weight: 500;
		margin-bottom: 24rpx;
	}
	
	.tips-text {
		display: block;
		font-size: 28rpx;
		color: #666;
		line-height: 1.6;
		margin-bottom: 16rpx;
	}
}
</style>
