🐞 fix(img): 修复图片展示慢的问题

This commit is contained in:
algerkc@qq.com
2023-12-18 15:24:57 +08:00
parent b4a692a09c
commit f893de62cd
5 changed files with 16 additions and 18 deletions
+2 -1
View File
@@ -33,5 +33,6 @@ export const getIsMc = () => {
export const getImgUrl = computed(() => (url: string, size: string) => {
const bdUrl = 'https://image.baidu.com/search/down?url='
return getIsMc() ? `${bdUrl}${url}?param${size}` : `${url}?param${size}`
const imgUrl = encodeURIComponent(`${url}?param=${size}`)
return getIsMc() ? `${bdUrl}${imgUrl}` : `${url}?param=${size}`
})