|
|
|
//获取当前时间
|
|
|
|
const date=new Date();
|
|
|
|
import App from '../../../utils/api';
|
|
|
|
import util from '../../../utils/util';
|
|
|
|
Component({
|
|
|
|
properties:{
|
|
|
|
seller:Object,
|
|
...
|
...
|
@@ -12,24 +13,23 @@ Component({ |
|
|
|
//日期
|
|
|
|
date:{
|
|
|
|
type:String,
|
|
|
|
value:''
|
|
|
|
value:util.unixtoTime(date/1000,'YYYY-MM-DD')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
attached(){
|
|
|
|
|
|
|
|
},
|
|
|
|
ready(){
|
|
|
|
//设置默认日期
|
|
|
|
if(this.data.date==''){
|
|
|
|
let currentmonth=date.getMonth()+1;
|
|
|
|
let currentdate=date.getDate();
|
|
|
|
this.setData({
|
|
|
|
date:date.getFullYear()+'-'+(currentmonth<10 ? '0'+currentmonth : currentmonth)+'-'+(currentdate<10 ? '0'+currentdate : currentdate)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
this.getroombydate();
|
|
|
|
this.triggerEvent('selecttime',{time:this.data.time,action:'defalut'})
|
|
|
|
},
|
|
|
|
observers: {
|
|
|
|
'date': function(date) {
|
|
|
|
this.setData({
|
|
|
|
date: date
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
selecttime(e){
|
|
|
|
const target=e.currentTarget.dataset;
|
...
|
...
|
|