2020-01-14 01:56:18 +00:00
|
|
|
|
// components/orderconfirm/orderyf/orderyf.js
|
|
|
|
|
Component({
|
|
|
|
|
/**
|
|
|
|
|
* 组件的属性列表
|
|
|
|
|
*/
|
|
|
|
|
properties: {
|
|
|
|
|
price: String
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 组件的初始数据
|
|
|
|
|
*/
|
|
|
|
|
data: {
|
|
|
|
|
date: "",
|
|
|
|
|
start:""
|
|
|
|
|
},
|
|
|
|
|
created(){
|
|
|
|
|
this.setData({
|
|
|
|
|
date:this.getCurTime(),
|
|
|
|
|
start:this.getCurTime()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 组件的方法列表
|
|
|
|
|
*/
|
|
|
|
|
methods: {
|
|
|
|
|
bindDateChange: function (e) {
|
|
|
|
|
console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
|
|
|
this.setData({
|
|
|
|
|
date: e.detail.value
|
|
|
|
|
})
|
2020-01-14 07:25:22 +00:00
|
|
|
|
this.triggerEvent("input",{date:e.detail.value})
|
2020-01-14 01:56:18 +00:00
|
|
|
|
},
|
|
|
|
|
getCurTime() {
|
|
|
|
|
var date = new Date();
|
|
|
|
|
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|