Browse Source

优化预约订单

yuhao 1 year ago
parent
commit
0bebd877bc
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/pages/home/createOrder/index.vue

+ 4 - 2
src/pages/home/createOrder/index.vue

@@ -114,9 +114,11 @@ export default {
114 114
   methods: {
115 115
     // 选择日期回调
116 116
     changeDate(e) {
117
-      let selectDate = `${e.getFullYear()}-${e.getMonth() + 1}-${e.getDate()}`;
117
+      let selectDate = `${e.getFullYear()}/${e.getMonth() + 1}/${e.getDate()}`;
118 118
       let date = new Date();
119
-      let nowDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
119
+      let nowDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
120
+      selectDate = Date.parse(selectDate)
121
+      nowDate = Date.parse(nowDate)
120 122
       if(selectDate>nowDate){
121 123
         this.nowTime = ''
122 124
         console.log(111);