guoshipeng
2023-05-11 b82c1f5e2c6daeede03f6fcf7c91ae66348d97e3
src/components/Wind/Map.vue
@@ -661,10 +661,16 @@
    },
    // 当前小时默认值
    currentHour() {
      // const aData = new Date()
      // const month = aData.getMonth() < 9 ? '0' + (aData.getMonth() + 1) : aData.getMonth() + 1
      // const date = aData.getDate() <= 9 ? '0' + aData.getDate() : aData.getDate()
      // const hour = aData.getHours() <= 9 ? '0' + aData.getHours() - 1 : aData.getHours() - 1
      // const currentDate = aData.getFullYear() + '-' + month + '-' + date + ' ' + hour + ':00'
      // this.dateFormat = currentDate.toString()
      const aData = new Date()
      const month = aData.getMonth() < 9 ? '0' + (aData.getMonth() + 1) : aData.getMonth() + 1
      const date = aData.getDate() <= 9 ? '0' + aData.getDate() : aData.getDate()
      const hour = aData.getHours() <= 9 ? '0' + aData.getHours() - 1 : aData.getHours() - 1
      const date = aData.getDate() < 10 ? '0' + aData.getDate()  : aData.getDate()
      const hour = aData.getHours()
      const currentDate = aData.getFullYear() + '-' + month + '-' + date + ' ' + hour + ':00'
      this.dateFormat = currentDate.toString()
    },