1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <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(site => {
- return site.beginsDate
- })
- }).catch(error => {
- this.$refs.uTips.show({
- title: error.message,
- 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>
|