diff --git a/src/styles/home/life.detail.module.scss b/src/styles/home/life.detail.module.scss index 9290c2c..c399aec 100644 --- a/src/styles/home/life.detail.module.scss +++ b/src/styles/home/life.detail.module.scss @@ -11,6 +11,7 @@ } section { + width: 100%; .info-container, .record-container { .info-item { padding: 1vh 1vw; diff --git a/src/views/period/calendar.vue b/src/views/period/calendar.vue index eacd541..9d70263 100644 --- a/src/views/period/calendar.vue +++ b/src/views/period/calendar.vue @@ -110,6 +110,14 @@ const calculatePeriodDay = (date: string, cycleLength = 28, duration = 5) => { for (const dateStr of allDates) { const currentDate = dayjs(dateStr) + if (dailyInfo.menstruateDateList.includes(formatDate(currentDate))) { + continue + } + + if (dailyInfo.sexDateList.includes(formatDate(currentDate))) { + continue + } + // 判断月经期,跳过 if (currentDate.isSame(startDate, 'day') || checkIsMenstruateDate(currentDate, startDate, duration)) { if (!dailyInfo.menstruateDateList.includes(dateStr)) { @@ -122,10 +130,6 @@ const calculatePeriodDay = (date: string, cycleLength = 28, duration = 5) => { continue } - if (dailyInfo.sexDateList.includes(formatDate(currentDate))) { - continue - } - // 判断排卵日 if (currentDate.isSame(ovulationDate, 'day')) { dailyInfo.attrs.push({ diff --git a/src/views/travel/recordForm.vue b/src/views/travel/recordForm.vue index abd0804..009f289 100644 --- a/src/views/travel/recordForm.vue +++ b/src/views/travel/recordForm.vue @@ -19,7 +19,7 @@