diff --git a/src/pages/realtimeInfo/index.vue b/src/pages/realtimeInfo/index.vue index a8cd2e8..1099262 100644 --- a/src/pages/realtimeInfo/index.vue +++ b/src/pages/realtimeInfo/index.vue @@ -67,7 +67,17 @@
- + + {{ chooseDate.startDate.split(' ')[0] }} + + + +
@@ -103,7 +113,7 @@ - @@ -135,7 +145,7 @@ let month = d.getMonth() + 1; month = month < 10 ? `0${month}` : month; const date = d.getDate(); const maxDate = `${year}-${month}-${date + 1}`; -const minDate = `${year}-${month}-${date - 10}`; +const minDate = `${year}-${month}-${date - 20}`; const calendarShow = ref(false); const newsList = ref([]); @@ -166,15 +176,16 @@ async function getTopNum() { } const chooseDate = reactive({ - startDate: null, + startDate: `${year}-${month}-${date}`, endDate: null, }); const today = new Date(); function calendarConfirm(dateList) { + console.log("🚀 ~ calendarConfirm ~ dateList:", dateList) if (dateList && dateList.length > 0) { - chooseDate.startDate = dateList[0]; - chooseDate.endDate = dateList[dateList.length - 1]; + chooseDate.startDate = dateList[0] + ' 00:00:00'; + chooseDate.endDate = dateList[dateList.length - 1] + ' 23:59:59'; } getNewsList(); calendarShow.value = false;