|
@@ -208,5 +208,14 @@ export const service = {
|
|
|
}
|
|
|
})
|
|
|
return monthObj
|
|
|
+ },
|
|
|
+ // 判断给定的日期在几月,通过获取到的月份数据进行筛选查找今天是划分到的几月
|
|
|
+ getTodayMonth: async () => {
|
|
|
+ const today: any = moment().format('YYYY-MM-DD')
|
|
|
+ const monthRange = service.getMonthRange(today)
|
|
|
+ const workDays = await http.getWorkDayList(monthRange[0], monthRange[1])
|
|
|
+ const findDay: any = workDays.find((day) => day.dateDay == moment(today).valueOf())
|
|
|
+ const realDate = moment(`${findDay.year}-${findDay.month}`)
|
|
|
+ return realDate
|
|
|
}
|
|
|
}
|