公司演示版e鹿悦游
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
CjyTravel/subPageB/pay/calendar/index.vue

147 lines
2.5 KiB

<template>
<view>
<uni-calendar :startDate="info.startDate" :endDate="info.endDate" @change="change" @confirm="confirm" />
</view>
</template>
<script>
import uniCalendar from '../../components/uni-calendar/uni-calendar.vue'
export default {
components: {
uniCalendar
},
data() {
return {
info: {
startDate: '',
endDate: '',
}
}
},
onLoad:function(option){
this.info = {
startDate: this.getCurrentTime(),
endDate: option.date2,
}
},
methods: {
change:function(e){
console.log('change 返回:', e)
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.isToDingDanType = true;
prevPage.tapDate = e.fulldate;
uni.navigateBack();
},
getCurrentTime: function() {
let yyyy = new Date().getFullYear();
let mm = new Date().getMonth() + 1;
let dd = new Date().getDate();
return yyyy + '-' + mm + '-' + dd;
},
}
}
</script>
<style>
/* 头条小程序组件内不能引入字体 */
/* #ifdef MP-TOUTIAO */
@font-face {
font-family: uniicons;
font-weight: normal;
font-style: normal;
src: url('~@/static/uni.ttf') format('truetype');
}
/* #endif */
/* #ifndef APP-NVUE */
page {
display: flex;
flex-direction: column;
box-sizing: border-box;
background-color: #efeff4;
min-height: 100%;
height: auto;
}
view {
font-size: 28rpx;
line-height: inherit;
}
.example {
padding: 0 30rpx 30rpx;
}
.example-info {
padding: 30rpx;
color: #3b4144;
background: #ffffff;
}
.example-body {
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
padding: 0;
font-size: 14rpx;
background-color: #ffffff;
}
/* #endif */
.example {
padding: 0 30rpx;
}
.example-info {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
padding: 30rpx;
color: #3b4144;
background-color: #ffffff;
font-size: 30rpx;
}
.example-info-text {
font-size: 28rpx;
line-height: 36rpx;
}
.example-body {
flex-direction: column;
padding: 30rpx;
background-color: #ffffff;
}
.word-btn-white {
font-size: 18px;
color: #FFFFFF;
}
.word-btn {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
border-radius: 6px;
height: 48px;
margin: 15px;
background-color: #00ceb9;
}
.word-btn--hover {
background-color: #4ca2ff;
}
.calendar-button {
flex: 1;
font-weight: bold;
font-size: 32rpx;
}
</style>