mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
image proxy
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "moviepilot",
|
"name": "moviepilot",
|
||||||
"version": "1.5.7-1",
|
"version": "1.5.7-2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"bin": "dist/service.js",
|
"bin": "dist/service.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -21,6 +21,12 @@ function goPlay() {
|
|||||||
if (props.media?.link)
|
if (props.media?.link)
|
||||||
window.open(props.media?.link, '_blank')
|
window.open(props.media?.link, '_blank')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 计算图片地址
|
||||||
|
const getImgUrl = computed(() => {
|
||||||
|
const image = props.media?.image || ''
|
||||||
|
return `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(image)}`
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -43,7 +49,7 @@ function goPlay() {
|
|||||||
>
|
>
|
||||||
<template #image>
|
<template #image>
|
||||||
<VImg
|
<VImg
|
||||||
:src="props.media?.image"
|
:src="getImgUrl"
|
||||||
aspect-ratio="2/3"
|
aspect-ratio="2/3"
|
||||||
cover
|
cover
|
||||||
@load="imageLoadHandler"
|
@load="imageLoadHandler"
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ function imageLoadHandler() {
|
|||||||
|
|
||||||
// 计算图片地址
|
// 计算图片地址
|
||||||
const getImgUrl = computed(() => {
|
const getImgUrl = computed(() => {
|
||||||
return props.media?.image || props.media?.image_list?.[0]
|
const image = props.media?.image || props.media?.image_list?.[0] || ''
|
||||||
|
return `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(image)}`
|
||||||
})
|
})
|
||||||
|
|
||||||
// 跳转播放
|
// 跳转播放
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ function getChipColor(type: string) {
|
|||||||
const getImgUrl = computed(() => {
|
const getImgUrl = computed(() => {
|
||||||
if (imageLoadError.value)
|
if (imageLoadError.value)
|
||||||
return noImage
|
return noImage
|
||||||
return props.media?.image
|
const image = props.media?.image || ''
|
||||||
|
return `${import.meta.env.VITE_API_BASE_URL}system/img/${encodeURIComponent(image)}`
|
||||||
})
|
})
|
||||||
|
|
||||||
// 跳转播放
|
// 跳转播放
|
||||||
|
|||||||
Reference in New Issue
Block a user