Commit 6f9f2550 by 张立顺

fix(venus-usedcar-quality): 视频封面获取问题修复

1 parent 7483ee1a
Pipeline #160 for 6f9f2550 failed in 0 seconds
......@@ -288,7 +288,12 @@ const videoSwipeAutoplayMs = computed(() =>
inspectVideos.value.length > 1 ? 4000 : 0,
);
const videoPosterUrl = computed(() => reportData.value.coverUrl);
/** 阿里云 OSS 视频截帧作为封面 */
function videoOssSnapshotPosterUrl(url: string) {
if (!url) return "";
const sep = url.includes("?") ? "&" : "?";
return `${url}${sep}x-oss-process=video/snapshot,t_1000,f_jpg,w_375,h_200,m_fast`;
}
const videoPlayerShow = ref(false);
const videoPlayerSrc = ref("");
......@@ -617,7 +622,7 @@ onMounted(() => {
<van-image fit="cover"
height="200"
radius="8"
:src="videoPosterUrl"
:src="videoOssSnapshotPosterUrl(v.url)"
width="100%">
<template #error>
<div class="video-cover__placeholder">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!