!289 修复暂停日期

Merge pull request !289 from 德仔/develop
This commit is contained in:
德仔 2021-06-22 07:59:59 +00:00 committed by Gitee
commit 31f576e59f

View File

@ -89,13 +89,13 @@ export default {
if (planPauseRes.code === 200) {
this.pauseDays = planPauseRes.data.reduce((arr, cur) => {
let startDate = cur.pauseStartDate;
while (dayjs(startDate) < dayjs(cur.pauseEndDate)) {
while (dayjs(startDate) <= dayjs(cur.pauseEndDate)) {
arr.push(startDate);
startDate = dayjs(startDate).add(1, "days").format("YYYY-MM-DD");
}
return arr;
}, []);
// console.log(this.pauseDays);
console.log(this.pauseDays);
}
const plansRes = await getRecipesPlans(this.id);