mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
fix 播放跳转
This commit is contained in:
@@ -417,8 +417,20 @@ function handleSearch(area: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 跳转播放页面
|
// 跳转播放页面
|
||||||
function handlePlay() {
|
async function handlePlay() {
|
||||||
window.open(`${import.meta.env.VITE_API_BASE_URL}mediaserver/play/${existsItemId.value}`, '_blank')
|
// 获取播放链接地址
|
||||||
|
try {
|
||||||
|
const result: { [key: string]: any } = await api.get(
|
||||||
|
`mediaserver/play/${existsItemId.value}`,
|
||||||
|
)
|
||||||
|
if (result?.success)
|
||||||
|
window.open(result.data?.url, '_blank')
|
||||||
|
else
|
||||||
|
$toast.error(`获取播放链接失败:${result.message}!`)
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user