diff --git a/common/config.js b/common/config.js index e40357d..2207b79 100644 --- a/common/config.js +++ b/common/config.js @@ -1,4 +1,4 @@ -const mode = 'development'; +const mode = process.env.NODE_ENV; let ROOTPATH = ''; //域名 switch (mode) { case 'development': diff --git a/pages/nursingCalendar/nursingCalendar.vue b/pages/nursingCalendar/nursingCalendar.vue index dca0256..6ecbe1e 100644 --- a/pages/nursingCalendar/nursingCalendar.vue +++ b/pages/nursingCalendar/nursingCalendar.vue @@ -219,7 +219,7 @@ //获取月份的开始星期 let startDay = - new Date(`${year}-${month}-1`).getDay() != 0 ? new Date(`${year}-${month}-1`).getDay() : 7 + new Date(`${year}/${month}/1`).getDay() != 0 ? new Date(`${year}/${month}/1`).getDay() : 7 //let arrayLength = Math.ceil((mDays.get(month) + startDay) / 7) let arrayLength = 6 @@ -240,8 +240,8 @@ type: 2 }) } else { - let nowDate = `${new Date().getFullYear()}-${new Date().getMonth()+1}-${new Date().getDate()}` - nowDate == `${this.year}-${this.month}-${date}` ? + let nowDate = `${new Date().getFullYear()}/${new Date().getMonth()+1}/${new Date().getDate()}` + nowDate == `${this.year}/${this.month}/${date}` ? res[i - 1].push({ date, type: 0,