修复已知的图片加载问题

This commit is contained in:
tangly1024.com
2024-04-29 13:55:30 +08:00
parent 4811cb7319
commit 9f64302ab6
2 changed files with 1 additions and 16 deletions

View File

@@ -60,7 +60,7 @@ const mapImgUrl = (img, block, type = 'block', from = 'post') => {
}
// 图片url优化确保每一篇文章的图片url唯一
if (ret && ret.length > 4) {
if (ret && !ret.includes('https://www.notion.so/images/')) {
// 图片接口拼接唯一识别参数,防止请求的图片被缓,而导致随机结果相同
const separator = ret.includes('?') ? '&' : '?'
ret = `${ret.trim()}${separator}t=${block.id}`