Forráskód Böngészése

🎨 修改细节问题

快乐的梦鱼 2 napja
szülő
commit
98f657687a
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      src/pages/fusion/index.vue

+ 3 - 2
src/pages/fusion/index.vue

@@ -215,8 +215,9 @@ const { data: monthData } = await useAsyncData('funCalendarContent2', async () =
   });
 
   for (let i = 0; i < monthData.length; i++) {
-    const startDay = CalendarUtils.solar2lunar(year, i + 1, 1);
-    const endDay = CalendarUtils.solar2lunar(year, i + 1, DateUtils.getMonthDays(year, i + 1));
+    const month = monthData[i].month;
+    const startDay = CalendarUtils.solar2lunar(year, month, 1);
+    const endDay = CalendarUtils.solar2lunar(year, month, DateUtils.getMonthDays(year, month - 1));
     monthData[i].desc = `${startDay.IMonthCn}${startDay.IDayCn} - ${endDay.IMonthCn}${endDay.IDayCn}`;
   }
   res.list.forEach(item => {