mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 23:16:49 +00:00
分页模式加载文章预览
This commit is contained in:
@@ -26,7 +26,9 @@ export default {
|
||||
POSTS: 'Posts',
|
||||
VISITORS: 'Visitors',
|
||||
VIEWS: 'Views',
|
||||
COPYRIGHT_NOTICE: 'All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!'
|
||||
COPYRIGHT_NOTICE: 'All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!',
|
||||
RESULT_OF_SEARCH: 'Results Found',
|
||||
ARTICLE_DETAIL: 'Article Details'
|
||||
},
|
||||
PAGINATION: {
|
||||
PREV: 'Prev',
|
||||
|
||||
@@ -28,7 +28,9 @@ export default {
|
||||
POSTS: '篇文章',
|
||||
VISITORS: '位访客',
|
||||
VIEWS: '次查看',
|
||||
COPYRIGHT_NOTICE: '本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。'
|
||||
COPYRIGHT_NOTICE: '本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。',
|
||||
RESULT_OF_SEARCH: '篇搜索到的结果',
|
||||
ARTICLE_DETAIL: '文章详情'
|
||||
},
|
||||
PAGINATION: {
|
||||
PREV: '上一页',
|
||||
|
||||
@@ -20,6 +20,22 @@ export async function getPostBlocks (id, from) {
|
||||
return null
|
||||
}
|
||||
|
||||
// 去掉不用的字段
|
||||
for (const j in pageBlock?.block) {
|
||||
const b = pageBlock?.block[j]
|
||||
if (b) {
|
||||
delete b.role
|
||||
delete b.value?.version
|
||||
delete b.value?.created_time
|
||||
delete b.value?.last_edited_time
|
||||
delete b.value?.created_by_table
|
||||
delete b.value?.created_by_id
|
||||
delete b.value?.last_edited_by_table
|
||||
delete b.value?.last_edited_by_id
|
||||
delete b.value?.space_id
|
||||
}
|
||||
}
|
||||
|
||||
if (pageBlock) {
|
||||
await setDataToCache(cacheKey, pageBlock)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user