Commit 9b41fdeb by lijiabin

【需求 17679】perf: 优化视频上传等

parent ebf8fa50
......@@ -17,6 +17,6 @@ console.log('App.vue mounted')
onMounted(() => {
setTimeout(() => {
initWxConfig()
}, 3000);
}, 3000)
})
</script>
......@@ -40,7 +40,7 @@
<div class="video-preview">
<video
:src="videoInfo.url"
poster="http://soundasia.oss-cn-shenzhen.aliyuncs.com/colleagueBar/jpg/2024/01/08/1704677467931.jpg"
poster="@/assets/img/culture/ask.png"
class="video-thumbnail"
muted
></video>
......@@ -183,15 +183,15 @@ const startUpload = async () => {
// 根据你的 API 返回结构调整
const videoData: VideoInfo = {
// url: data.fileUrl,
url: data.data[0].filePath,
// 暂时写死
url: 'https://soundasia.oss-cn-shenzhen.aliyuncs.com/OA/readName/mp4/2025/11/12/Common/1762918987602.mp4',
// url: 'https://soundasia.oss-cn-shenzhen.aliyuncs.com/OA/readName/mp4/2025/11/12/Common/1762918987602.mp4',
name: currentFile.value.name,
size: currentFile.value.size,
duration: metadata.duration,
resolution: metadata.resolution,
poster: data.fileUrl,
fileId: data.fileId,
poster: data.data[0].filePath,
fileId: data.data[0].fileId,
}
videoInfo.value = videoData
......@@ -358,7 +358,7 @@ const retryUpload = () => {
height: 80px;
border-radius: 8px;
overflow: hidden;
background: #000;
/* background: #000; */
}
.video-thumbnail {
......
......@@ -69,13 +69,16 @@ const dialogVisible = ref(false)
const selectedAmount = ref(2)
const balance = ref(0)
let articleId = -1
const rewardOptions = ref<RewardOption[]>([
{ amount: 1, icon: '🪙', selected: false },
{ amount: 2, icon: '🪙🪙', selected: true },
])
// 暴露 open 方法
const open = () => {
const open = (id: number) => {
articleId = id
dialogVisible.value = true
getYaBiDataFn()
}
......@@ -101,7 +104,7 @@ const handleConfirm = async () => {
}
await addOrCancelArticleReward({
articleId: 1,
articleId: articleId,
ayabi: selectedAmount.value,
})
ElMessage.success('打赏成功!')
......
......@@ -184,7 +184,7 @@ const handleCollect = async (item: ArticleItemDto) => {
// 打赏
const handleReward = () => {
rewardDialogRef.value?.open()
rewardDialogRef.value?.open(videoDetail.value.id)
}
onMounted(async () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment