Commit 92d5b6c2ebe59194c2d682e62e9de8424dbffc4d

Authored by liuxuqinfhp1220
1 parent 8c2bd4a9

no message

Showing 1 changed file with 9 additions and 9 deletions
//获取当前时间
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;
... ...