<template>
	<view class="content">
		<view class="top-input dfsb">
			<navigator url="/pages/index/screenList" class="sel dffs">
				条件筛选
				<u-icon name="arrow-right" color="#F89638" size="10"></u-icon>
			</navigator>
			<u-search :showAction="false" placeholder="输入关键词搜索课程" @focus="toNext('/pages/index/search')" v-model="keyword"></u-search>
		</view>
		<view class="swiper"><u-swiper :autoplay="false" :list="banner" height="120" border-radius="20" @click="bannerClick"></u-swiper></view>
		<view class="conwarp">
			<view class="gdHead dfsb">
				<view class="head">基础知识过关</view>
				<view class="fontssm textgrey dffs">
					查看更多
					<u-icon name="arrow-right" color="#999" size="10"></u-icon>
				</view>
			</view>
			<view class="fl-five"><course-list :flag="1" :list="baosList"></course-list></view>
		</view>
		<view class="conwarp">
			<view class="gdHead dfsb">
				<view class="head">基础知识过关</view>
				<view class="fontssm textgrey dffs">
					查看更多
					<u-icon name="arrow-right" color="#999" size="10"></u-icon>
				</view>
			</view>
			<view class="fl-five"><course-list :flag="1" :list="baosList"></course-list></view>
		</view>
		<view class="conwarp">
			<view class="gdHead dfsb">
				<view class="head">基础知识过关</view>
				<view class="fontssm textgrey dffs">
					查看更多
					<u-icon name="arrow-right" color="#999" size="10"></u-icon>
				</view>
			</view>
			<view class="fl-five"><video-list :flag="1" :list="baosList"></video-list></view>
		</view>
	</view>
</template>

<script>
import courseList from './components/knowList.vue';
import videoList from './components/knowVidList.vue';
export default {
	components: {
		courseList,
		videoList
	},
	data() {
		return {
			keyword: '',
			banner: [],
			baosList: [
				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' }
			]
		};
	},
	onPullDownRefresh() {
		setTimeout(res => {
			uni.stopPullDownRefresh();
		}, 1000);
	},
	//url: `/pages/index/knowledgeList?flag=${val}&subject_id=${val}&grade_id=${this.grade_id}&title=${item.name}`
	onLoad(opt) {
		this.nav_id = opt.nav_id || '';
		this.cat = opt.cat || '';
		this.getInfoList();
		this.getInfoList();
	},
	methods: {
		getInfoList() {},
		toNext(url) {
			uni.navigateTo({
				url: url
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.content {
	.top-input {
		padding: 20rpx 30rpx;
		.sel {
			color: #f89638;
			padding: 12rpx 20rpx;
			font-size: $font-sm;
			background-color: rgba(#f89638, 0.1);
			border-radius: 30rpx;
			margin-right: 36rpx;
		}
	}
	.swiper {
		margin: 20rpx 30rpx;
	}
	.conwarp {
		background-color: #fff;
		padding: 32rpx 30rpx 30rpx;
		border-radius: 16rpx;
		margin-bottom: 20rpx;
		.gdHead {
			line-height: 58rpx;
			margin-bottom: 16rpx;
			.head {
				font-size: 34rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 600;
				color: #333333;
				line-height: 48rpx;
			}
		}
	}
}
</style>
