|
@ -16,7 +16,7 @@ Page({ |
|
|
id: '', //主键 更新时携带
|
|
|
id: '', //主键 更新时携带
|
|
|
groupBuyTitle: '', //标题
|
|
|
groupBuyTitle: '', //标题
|
|
|
groupBuyContent: '', //内容
|
|
|
groupBuyContent: '', //内容
|
|
|
// groupBuyTime: '', //团购时间
|
|
|
groupBuyEndTime: '', //截止时间
|
|
|
groupBuyMobile: '', //手机
|
|
|
groupBuyMobile: '', //手机
|
|
|
groupBuyPriceNumber: [ |
|
|
groupBuyPriceNumber: [ |
|
|
{ |
|
|
{ |
|
@ -140,32 +140,32 @@ Page({ |
|
|
'dataForm.groupBuyPriceNumber': this.data.dataForm.groupBuyPriceNumber |
|
|
'dataForm.groupBuyPriceNumber': this.data.dataForm.groupBuyPriceNumber |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// pickerCancel () {
|
|
|
pickerCancel () { |
|
|
// console.log('取消日期选择')
|
|
|
console.log('取消日期选择') |
|
|
// this.setData({
|
|
|
this.setData({ |
|
|
// showPicker: false,
|
|
|
showPicker: false, |
|
|
// 'dataForm.groupBuyTime': ''
|
|
|
'dataForm.groupBuyEndTime': '' |
|
|
// })
|
|
|
}) |
|
|
// },
|
|
|
}, |
|
|
// pickerConfirm (e) {
|
|
|
pickerConfirm (e) { |
|
|
// console.log('选择日期', e.detail.time)
|
|
|
console.log('选择日期', e.detail.time) |
|
|
// if (e.detail.time < getTimestamp()) {
|
|
|
if (e.detail.time < getTimestamp()) { |
|
|
// this.showToast("团购时间应该大于当前时间")
|
|
|
this.showToast("截止时间应该大于当前时间") |
|
|
// } else {
|
|
|
} else { |
|
|
// this.setData({
|
|
|
this.setData({ |
|
|
// showPicker: false,
|
|
|
showPicker: false, |
|
|
// 'dataForm.groupBuyTime': e.detail.time
|
|
|
'dataForm.groupBuyEndTime': e.detail.time |
|
|
// })
|
|
|
}) |
|
|
// }
|
|
|
} |
|
|
// },
|
|
|
}, |
|
|
// //日期选择插件显示入口
|
|
|
//日期选择插件显示入口
|
|
|
// selectTime (e) {
|
|
|
selectTime (e) { |
|
|
// this.data.showPicker = !this.data.showPicker
|
|
|
this.data.showPicker = !this.data.showPicker |
|
|
// this.setData({
|
|
|
this.setData({ |
|
|
// showPicker: this.data.showPicker,
|
|
|
showPicker: this.data.showPicker, |
|
|
// 'dataForm.groupBuyTime': this.data.dataForm.groupBuyTime || getTimestamp()
|
|
|
'dataForm.groupBuyEndTime': this.data.dataForm.groupBuyEndTime || getTimestamp() |
|
|
// })
|
|
|
}) |
|
|
// },
|
|
|
}, |
|
|
//发布
|
|
|
//发布
|
|
|
submitApply () { |
|
|
submitApply () { |
|
|
if (this.data.lock) { |
|
|
if (this.data.lock) { |
|
@ -179,10 +179,10 @@ Page({ |
|
|
this.showToast("标题限制在50字以内") |
|
|
this.showToast("标题限制在50字以内") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
// if (!this.data.dataForm.groupBuyTime) {
|
|
|
if (!this.data.dataForm.groupBuyEndTime) { |
|
|
// this.showToast("请填写团购时间")
|
|
|
this.showToast("请填写截止时间") |
|
|
// return false
|
|
|
return false |
|
|
// }
|
|
|
} |
|
|
if (!this.data.dataForm.groupBuyContent) { |
|
|
if (!this.data.dataForm.groupBuyContent) { |
|
|
this.showToast("请填写团购内容") |
|
|
this.showToast("请填写团购内容") |
|
|
return false |
|
|
return false |
|
|