fix image proxy

This commit is contained in:
jxxghp
2024-01-08 12:25:06 +08:00
parent 4d3b69ca34
commit 9558a420e9
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ function goPlay() {
// 计算图片地址 // 计算图片地址
const getImgUrl = computed(() => { const getImgUrl = computed(() => {
const image = props.media?.image || '' const image = props.media?.image || ''
return `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(image)}` return `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(image)}/0`
}) })
</script> </script>
+2 -2
View File
@@ -56,7 +56,7 @@ function getImgUrl(url: string) {
if (!url) if (!url)
return getDefaultImage() return getDefaultImage()
else else
return `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(url)}` return `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(url)}/0`
} }
// 根据多张图片生成媒体库封面 // 根据多张图片生成媒体库封面
@@ -68,7 +68,7 @@ async function drawImages(imageList: string[]) {
// 为所有图片添加system/img前缀 // 为所有图片添加system/img前缀
for (let i = 0; i < IMAGES.length; i++) for (let i = 0; i < IMAGES.length; i++)
IMAGES[i] = `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(IMAGES[i])}` IMAGES[i] = `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(IMAGES[i])}/0`
// canvas // canvas
const canvas = canvasRef.value const canvas = canvasRef.value
+1 -1
View File
@@ -31,7 +31,7 @@ const getImgUrl = computed(() => {
if (imageLoadError.value) if (imageLoadError.value)
return noImage return noImage
const image = props.media?.image || '' const image = props.media?.image || ''
return `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(image)}` return `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(image)}/0`
}) })
// 跳转播放 // 跳转播放