feat:增加美食朋友圈接口

This commit is contained in:
2025-06-25 16:27:42 +08:00
parent 71c107f2e5
commit eff6078a98
17 changed files with 243 additions and 183 deletions

View File

@@ -45,13 +45,13 @@ const updateInfo = () => {
const getCalendarMoveDate = () => {
dailyInfo.calendarDate = formatDate(new Date())
const foodLength = foodStore.foodRecordList.length
const foodLength = foodStore.recordList.length
if (foodLength > 0) {
const today = formatDate(new Date())
if (foodStore.foodRecordList.some((item) => item.date === today)) {
if (foodStore.recordList.some((item) => item.date === today)) {
dailyInfo.calendarDate = today
} else {
dailyInfo.calendarDate = formatDate(foodStore.foodRecordList[foodLength - 1].date)
dailyInfo.calendarDate = formatDate(foodStore.recordList[foodLength - 1].date)
}
} else {
dailyInfo.calendarDate = ''
@@ -66,7 +66,7 @@ const getCalendarAttrDates = () => {
dates: new Date()
})
const dateList = foodStore.foodRecordList.map((item) => item.date)
const dateList = foodStore.recordList.map((item) => item.date)
dailyInfo.attrs.push({
dot: 'red',
dates: [...new Set(dateList)]