40 lines
701 B
JavaScript
40 lines
701 B
JavaScript
// 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
|
||
})
|
||
},
|
||
getCurTime() {
|
||
var date = new Date();
|
||
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
|
||
|
||
}
|
||
}
|
||
})
|