<template>
	<view class="content">
		<u-calendar v-model="timeShow" mode="date" :active-bg-color="mainColor" :availableBgColor="mainColor" btn-type="error"
		 availableText="有课" popupMode="top" :available="availableList" max-date="2300-12-31" :closeable="false"
		 :mask-close-able="false" :handleStatus="false" :popupMask="false" toolTip=" "></u-calendar>
		<u-top-tips ref="uTips"></u-top-tips>
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	const NET = require('@/utils/request')
	const API = require('@/config/api')
	export default {
		computed: {
			...mapGetters([
				'mainColor',
				'customStyle',
			])
		},
		data() {
			return {
				timeShow: true,
				availableList: []
			}
		},
		onLoad() {
			NET.request(API.getTimetableList, {}, 'POST').then(res => {
				this.availableList = res.data.map(skite => {
					return site.beginsDate
				})
			}).catch(error => {
				this.$refs.uTips.show({
					title: error.data.msg,
					type: 'warning',
				})
			})
		},
		onReady() {},
		methods: {},
	}
</script>

<style>
	page {
		width: 100%;
		height: 100%;
		position: relative;
	}
</style>
<style lang="scss" scoped>
	.content {
		width: 100%;
		float: left;
		height: 100%;
	}
</style>
