Merge branch 'test' into prod

This commit is contained in:
18390123501 2024-05-23 13:45:34 +08:00
commit 7d0768c079
1 changed files with 21 additions and 4 deletions

View File

@ -60,7 +60,7 @@
报名截止时间<text style="color: red;">*</text>
</view>
<view class="uni-list-cell-db">
<uni-datetime-picker ref="abortDate" type="datetime" v-model="abortDate" @change="changeLog" />
<uni-datetime-picker ref="abortDate" type="datetime" v-model="abortDate" @change="changeLog" />
</view>
</view>
</view>
@ -181,12 +181,29 @@ export default {
},
methods: {
changeLog (e) {
if (new Date(this.date).getTime() < new Date(e).getTime()) {
// console.log(new Date(this.date).getTime());
// console.log();
// return
let shoIHide = (new Date(e).getTime() - new Date(this.date).getTime()) < 57599000
if(shoIHide){
this.abortDate = e
}else{
toast("报名截止时间不能大于开始时间!")
this.$refs.abortDate.clear()
} else {
this.abortDate = e
}
// if (new Date(this.date).getTime() < new Date(e).getTime()) {
// if (!shoIHide) {
// toast("")
// this.$refs.abortDate.clear()
// } else {
// this.abortDate = e
// }
// toast("")
// this.$refs.abortDate.clear()
// } else {
// this.abortDate = e
// }
},
chang (e) {
this.joinValue = e.detail.value