图片地址兼容性

This commit is contained in:
tangly1024.com
2023-03-10 15:12:35 +08:00
parent e906ac31d8
commit 88ed5f3fea

View File

@@ -1,3 +1,5 @@
import BLOG from '@/blog.config'
/**
* Notion图片映射处理有emjji的图标
* @param {*} img
@@ -18,7 +20,7 @@ const mapImgUrl = (img, block, type = 'block') => {
}
// notion永久图床地址
if (!ret && img.indexOf('secure.notion-static.com') > 0) {
if (!ret && img.indexOf('secure.notion-static.com') > 0 && BLOG.IMG_URL_TYPE === 'Notion') {
ret = 'https://www.notion.so/image/' + encodeURIComponent(img) + '?table=' + type + '&id=' + block.id
}