This commit is contained in:
花有清香月有阴
2021-12-30 18:04:45 +08:00
parent eb9f316b36
commit 6be5230b9c

View File

@@ -9,7 +9,6 @@
<u-form-item label="活动详情" prop="content" required :border-bottom="false" label-position="top" class="contents">
<!-- <u-input v-model="forms.content" placeholder="请输入活动详情(500字以内)" type="textarea" auto-height height="100" maxlength="500" /> -->
<AiEditor v-model="forms.content" placeholder="请输入活动详情(500字以内)" :maxlength="500" />
</u-form-item>
<div class="line"></div>
@@ -206,10 +205,28 @@ export default {
confirm(e) {
if (this.showStartTime == true) {
this.forms.beginTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00'
var nowTime = new Date().getTime() * 1
var historyTime = new Date(e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00').getTime() * 1
if (nowTime > historyTime) {
this.forms.beginTime = ''
return this.$u.toast('开始时间应大于当前时间')
} else {
this.forms.beginTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00'
}
}
if (this.showEndTime == true) {
this.forms.endTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00'
var nowTime = new Date().getTime() * 1
var historyTime = new Date(e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00').getTime() * 1
if (nowTime > historyTime) {
this.forms.endTime = ''
return this.$u.toast('结束时间应大于当前时间')
} else {
this.forms.endTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + '00'
}
}
},