Commit 9b41fdeb by lijiabin

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

parent ebf8fa50
...@@ -17,6 +17,6 @@ console.log('App.vue mounted') ...@@ -17,6 +17,6 @@ console.log('App.vue mounted')
onMounted(() => { onMounted(() => {
setTimeout(() => { setTimeout(() => {
initWxConfig() initWxConfig()
}, 3000); }, 3000)
}) })
</script> </script>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div class="video-preview"> <div class="video-preview">
<video <video
:src="videoInfo.url" :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" class="video-thumbnail"
muted muted
></video> ></video>
...@@ -183,15 +183,15 @@ const startUpload = async () => { ...@@ -183,15 +183,15 @@ const startUpload = async () => {
// 根据你的 API 返回结构调整 // 根据你的 API 返回结构调整
const videoData: VideoInfo = { 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, name: currentFile.value.name,
size: currentFile.value.size, size: currentFile.value.size,
duration: metadata.duration, duration: metadata.duration,
resolution: metadata.resolution, resolution: metadata.resolution,
poster: data.fileUrl, poster: data.data[0].filePath,
fileId: data.fileId, fileId: data.data[0].fileId,
} }
videoInfo.value = videoData videoInfo.value = videoData
...@@ -358,7 +358,7 @@ const retryUpload = () => { ...@@ -358,7 +358,7 @@ const retryUpload = () => {
height: 80px; height: 80px;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
background: #000; /* background: #000; */
} }
.video-thumbnail { .video-thumbnail {
......
...@@ -69,13 +69,16 @@ const dialogVisible = ref(false) ...@@ -69,13 +69,16 @@ const dialogVisible = ref(false)
const selectedAmount = ref(2) const selectedAmount = ref(2)
const balance = ref(0) const balance = ref(0)
let articleId = -1
const rewardOptions = ref<RewardOption[]>([ const rewardOptions = ref<RewardOption[]>([
{ amount: 1, icon: '🪙', selected: false }, { amount: 1, icon: '🪙', selected: false },
{ amount: 2, icon: '🪙🪙', selected: true }, { amount: 2, icon: '🪙🪙', selected: true },
]) ])
// 暴露 open 方法 // 暴露 open 方法
const open = () => { const open = (id: number) => {
articleId = id
dialogVisible.value = true dialogVisible.value = true
getYaBiDataFn() getYaBiDataFn()
} }
...@@ -101,7 +104,7 @@ const handleConfirm = async () => { ...@@ -101,7 +104,7 @@ const handleConfirm = async () => {
} }
await addOrCancelArticleReward({ await addOrCancelArticleReward({
articleId: 1, articleId: articleId,
ayabi: selectedAmount.value, ayabi: selectedAmount.value,
}) })
ElMessage.success('打赏成功!') ElMessage.success('打赏成功!')
......
...@@ -184,7 +184,7 @@ const handleCollect = async (item: ArticleItemDto) => { ...@@ -184,7 +184,7 @@ const handleCollect = async (item: ArticleItemDto) => {
// 打赏 // 打赏
const handleReward = () => { const handleReward = () => {
rewardDialogRef.value?.open() rewardDialogRef.value?.open(videoDetail.value.id)
} }
onMounted(async () => { 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