<template>
	<view class="page">
		<view class="video">
			<image src="../../static/logo.png" style="width: 750rpx;height: 456rpx;" mode=""></image>
			<image v-if="current==1" src="/static/images/play.png" mode="" class="ding"></image>
			<image v-if="current==0" src="/static/images/free.png" mode="" class="free"></image>
		</view>
		<view class="">
			<u-tabs active-color='#06A971' :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
			<view class="" style="border-top: 2rpx solid rgba(151, 151, 151, 0.1);" v-if="current==0">
				<view class="">
					<view class="" style="padding:  0 28rpx;">
						<view class="titles">25考研数学定制VIP领学3班·S班</view>
						<view class="teacher">
							<text>课程讲师：</text>
							<text>武忠祥 刘金峰 姜晓千</text>
						</view>
						<view class="money">
							<text>¥</text>
							<text>48.5</text>
						</view>
					</view>
					<view class="back"></view>
					<view class="introduce">
						<view class="titles" style="margin-top: 0;">
							课程介绍
						</view>
					</view>
				</view>
			</view>
			<view class="catalogue" v-if="current==1">
				<view class="section u-flex u-row-between">
					<view class="">
						<text class="tong">章节1</text>
						<text class="tong" style="margin-left: 20rpx;">高等数学通用</text>
					</view>
					<view class="look">
						观看
					</view>
				</view>
			</view>
		</view>
		<view class="bottom" style="display: flex;justify-content: space-between;">
			<view class="button1 u-flex u-row-center" v-if="current==0">
				<view class="">免费试看</view>
				<image src="/static/images/slice.png" style="width: 32rpx; height: 32rpx;margin-left: 12rpx;" mode=""></image>
			</view>
			<view class="button2" v-if="current==0">
				立即订阅
			</view>
			<view class="button" v-if="current==1">
				立即学习
			</view>
		</view>
	</view>
</template>  

<script>
	export default {
		data() {
			return {
				list: [{
					name: '课程介绍',
				}, {
					name: '目录',
				}],
				current: 0,
				show: false
			};
		},
		methods: {
			change(index) {
				this.current = index;
			},
			toupdown() {
				uni.navigateTo({
					url: '/pages/index/updown'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.button1 {
		width: 336rpx;
		height: 88rpx;
		background: #EEEEEE;
		border-radius: 12rpx;
		font-size: 32rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		color: #444444;
		text-align: center;
		line-height: 88rpx;
	}

	.button2 {
		width: 336rpx;
		height: 88rpx;
		background: #06A971;
		border-radius: 12rpx;
		font-size: 32rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		text-align: center;
		line-height: 88rpx;
	}

	.introduce {
		padding: 32rpx 28rpx;
	}

	.back {
		height: 20rpx;
		background: #F5F5F5;
	}

	.money {
		font-size: 28rpx;
		font-family: SFPro, SFPro;
		font-weight: 500;
		color: #CC3300;
		margin-top: 28rpx;
		margin-bottom: 40rpx;
	}

	.teacher {
		font-size: 24rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		color: #777777;
		margin-top: 24rpx;
	}

	.titles {
		font-size: 32rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		color: #222222;
		margin-top: 30rpx;
	}

	.tong {
		font-size: 26rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		color: #333333;
	}

	.look {
		width: 64rpx;
		height: 36rpx;
		background: #06A971;
		border-radius: 6rpx;
		font-size: 20rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		text-align: center;
		line-height: 36rpx;
	}

	.bottom {
		width: 750rpx;
		height: 166rpx;
		background: #FFFFFF;
		position: fixed;
		padding: 16rpx 28rpx 62rpx;
		bottom: 0;
		left: 0;
	}

	.catalogue {
		border-top: 2rpx solid rgba(151, 151, 151, 0.1);
		padding: 10rpx 28rpx;
	}

	.section {
		width: 702rpx;
		height: 84rpx;
		background: #F4F4F4;
		border-radius: 8rpx;
		padding: 24rpx 20rpx 24rpx 24rpx;
		margin-top: 20rpx;
	}

	.button {
		width: 694rpx;
		height: 88rpx;
		background: #06A971;
		border-radius: 12rpx;
		font-size: 32rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		text-align: center;
		line-height: 88rpx;
	}

	.page {
		height: 100vh;
	}

	.video {
		width: 750rpx;
		height: 456rpx;
		position: relative;
	}

	.ding {
		position: absolute;
		left: 50%;
		top: 50%;
		width: 90rpx;
		height: 90rpx;
		margin-left: -45rpx;
		margin-top: -45rpx;
	}

	.free {
		position: absolute;
		left: 50%;
		top: 50%;
		width: 290rpx;
		height: 88rpx;
		margin-left: -145rpx;
		margin-top: -44rpx;
	}
</style>