<template>
	<view class="page">
		<view class="index-navbar">
			<view class="" style="position: relative;;">
				<u-navbar title-width='300' title='' :is-back="false" :border-bottom="false"
					:background="{background:'rgba(0,0,0,0)'}" :isFixed="true">
					<view class="u-flex u-row-between" style="padding: 0  28rpx ;width: 100vw;">
						<view class="">
							logo
						</view>
						<view class="index-search u-flex" style="margin-left: 54rpx;">
							<u-icon name="search" color="#979797" size="30"></u-icon>
							<input style="margin-left: 12rpx;" type="text" class="text1" placeholder="请输入书名、作者搜索"
								:disabled="true">
						</view>
						<view class="button">
							<text>投稿</text>
						</view>
					</view>
				</u-navbar>
				<view class="back"></view>
			</view>
			<view class="u-flex u-row-between pad" style="margin-top:36rpx ;">
				<view class="" v-for="(item,index) in list" :key="index" @click="onchange(index)">
					<text :class="curret==index?'one':'two' ">{{item}}</text>
					<view v-if="curret==index" class="bottom">
					</view>
				</view>
			</view>
		</view>
		<view class="" style="height: 400rpx;"></view>
		<view class="back pad">
			<view class="wrap">
				<u-swiper :list="list"></u-swiper>
			</view>
			<view class="jiang">
				<view class="u-flex u-row-between">
					<text class="title1">获奖教材</text>
					<view class="look">查看更多</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					'首页', '纸质书', '电子书', '名师教学视频'
				],
				curret: 0
			}
		},
		onLoad() {

		},
		methods: {
			onchange(index) {
				this.curret = index
			}
		}
	}
</script>

<style lang="scss" scoped>
	.look {
		width: 130rpx;
		height: 40rpx;
		background: rgba(6, 169, 113, 0.1);
		border-radius: 24rpx;
		font-size: 20rpx;
		font-weight: 400;
		color: #06A971;
		line-height: 40rpx;
		text-align: center;
		padding: 6rpx 12rpx;
		box-sizing: border-box;
	}

	.title1 {
		font-size: 32rpx;
		font-family: STSongti-SC, STSongti-SC;
		font-weight: bold;
		color: #000000;
	}

	.jiang {
		width: 702rpx;
		height: 978rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		padding: 28rpx 20rpx 0;
	}

	.back {
		position: relative;
		height: 80vh;
		z-index: 4;
	}

	.wrap {
		margin-top: 40rpx;
		height: 280rpx;
		border-radius: 20rpx;
	}

	.pad {
		padding: 0 28rpx;
	}

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

	.two {
		font-size: 30rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		color: #555555;
	}

	.bottom {
		width: 64rpx;
		height: 12rpx;
		background: linear-gradient(270deg, rgba(6, 169, 113, 0) 0%, #0ED4AA 100%);
		margin-top: -15rpx;
	}

	.index-search {
		width: 414rpx;
		height: 60rpx;
		background: #FFFFFF;
		border-radius: 38rpx;
		padding-left: 34rpx;
	}

	.page {
		// padding: 0 28rpx;
		min-height: 100vh;
		background: rgba(243, 243, 243, 1);
	}

	.button {
		width: 128rpx;
		height: 60rpx;
		background: #06A971;
		border-radius: 30rpx;
		// margin-left: 24rpx;
		line-height: 60rpx;
		text-align: center;
		font-size: 24rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
	}

	.index-navbar {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		z-index: 2;

		// overflow: hidden;
		.back {
			position: absolute;
			top: 0;
			left: 0;
			z-index: -1;
			width: 100vw;
			height: 432rpx;
			background: url(/static/images/bj.png);
		}
	}
</style>