This commit is contained in:
tangly1024.com
2023-06-30 14:28:15 +08:00
parent 96908a9290
commit 0f7e5f2fb9
26 changed files with 74 additions and 75 deletions

View File

@@ -92,11 +92,9 @@ export default async function getPageProperties(id, block, schema, authToken, ta
properties.slug += '.html'
}
}
properties.sortDate = value?.date?.start_date || value.created_time
properties.createdTime = formatDate(new Date(value.created_time).toString(), BLOG.LANG)
properties.publishTime = value?.date?.start_date ? formatDate(new Date(value?.date?.start_date).toString, BLOG.LANG) : properties.createdTime
properties.lastEditedTime = formatDate(new Date(value?.last_edited_time).toString(), BLOG.LANG)
properties.publishDate = new Date(properties?.date?.start_date || value.created_time).getTime()
properties.publishTime = formatDate(properties.publishDate, BLOG.LANG)
properties.lastEditedTime = formatDate(new Date(value?.last_edited_time), BLOG.LANG)
properties.fullWidth = value.format?.page_full_width ?? false
properties.pageIcon = mapImgUrl(block[id].value?.format?.page_icon, block[id].value) ?? ''
properties.pageCover = mapImgUrl(block[id].value?.format?.page_cover, block[id].value) ?? ''