<template>
	<view class="exercise">
		<view class="title">答题</view>
		<view class="subTitle">坚持练习掌握优质内容</view>
		<view class="firstCard" @click="goExercise('dayQuestion')">
			<view class="left">
				<i class="t-icon custom-t-icon-rili"></i>
			</view>
			<view class="right">
				<view class="partName">每日答题</view>
				<view class="tip">太阳每天都是新的</view>
			</view>
		</view>
		<view class="secondCard" @click="goExercise('specialQuestion')">
			<view class="left">
				<i class="t-icon custom-t-icon-list"></i>
			</view>
			<view class="right">
				<view class="partName">专项答题</view>
				<view class="tip">术业有专攻，道义有精论</view>
			</view>
		</view>

		<!-- 底部导航 -->
		<Tabbar :current-page="2" />
	</view>
</template>

<script>
	import Tabbar from "@/components/Tabbar/index.vue";
	export default {
		components: {
			Tabbar
		},
		data() {
			return {}
		},
		onLoad() {

		},
		methods: {
			// 跳转到答题页面
			goExercise(val) {
				uni.navigateTo({
					// url: 'test?id=1&name=uniapp'
					// pages/exercise/components/dayQuestion/index
					url: `/pages/exercise/components/${val}/index`
				});
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f9f9f9;
		height: 100%;
	}

	.exercise {
		padding: 40rpx;

		.title {
			font-size: 60rpx;
			font-weight: 900;
		}

		.subTitle {
			margin: 20rpx 0;
			color: #666;
		}

		.firstCard,
		.secondCard {
			width: 98%;
			height: 300rpx;
			margin: 30rpx 0;
			border-radius: 20rpx;
			display: flex;
			align-items: center;
			box-shadow: 0 0 20rpx 10rpx rgba(0, 0, 0, 0.1);

			.left {
				width: 40%;
				text-align: center;

				.t-icon {
					width: 100rpx;
					height: 100rpx;
				}

				.custom-t-icon-rili {
					width: 120rpx;
					height: 120rpx;
				}
			}

			.right {
				flex: 1;
				padding: 0 20rpx;

				.partName {
					font-size: 52rpx;
					font-weight: 600;
					margin-bottom: 36rpx;
				}

				.tip {
					color: #333;
				}
			}
		}

		.firstCard {
			margin-top: 60rpx;
			background: linear-gradient(to right, #f8a189, #f9ece5);
		}

		.secondCard {
			background: linear-gradient(to right, #96bef3, #e8f2f8);
		}
	}
</style>