|
@@ -1,19 +1,32 @@
|
|
|
<template>
|
|
|
<div class="wrapper">
|
|
|
<!-- :poster="videoImg"视频封面 -->
|
|
|
- <video id="my-player" style="width:500px;" :key="current.public_video_url" class="video-js" controls autoplay
|
|
|
+ <video id="my-player" style="width:500px;" v-if="viewStatus" :key="wxcurrent.wxpublic_video_url" class="video-js"
|
|
|
+ controls autoplay ref="myVideo">
|
|
|
+ <source :src="wxcurrent.wxpublic_video_url" type="video/mp4">
|
|
|
+ </video>
|
|
|
+ <video id="my-player" style="width:500px;" v-else :key="current.public_video_url" class="video-js" controls autoplay
|
|
|
ref="myVideo">
|
|
|
<source :src="current.public_video_url" type="video/mp4">
|
|
|
</video>
|
|
|
+
|
|
|
<!-- 视频名称列表布局 -->
|
|
|
<div class="video-wrapper">
|
|
|
<div class="flex items-center justify-between h-10">
|
|
|
<div class="w-full text-base font-medium">剧名: <span class="ml-2 text-lg font-bold text-dark-600">{{
|
|
|
- props.primary.name }}</span> <span v-if="current.series_name">(当前播放{{ current.series_name }})</span></div>
|
|
|
- <el-button type="primary" size="default" @click="syncVideoChange">同步视频</el-button>
|
|
|
+ props.primary.name }}</span> <span v-if="current.series_name || wxcurrent.series_name">
|
|
|
+ (当前播放{{ current.series_name || wxcurrent.series_name }})
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <el-button :type="viewStatus ? 'success' : 'default'" size="default" @click="changeSoure"
|
|
|
+ v-action="'video.VideoSeriesWechatCheck.medialink'">({{ viewStatus ?
|
|
|
+ '微信视频' : '原始视频' }})切换视频播放源</el-button>
|
|
|
+ <el-button type="primary" size="default" v-action="'video.VideoSeriesWechatCheck.syncWechat'"
|
|
|
+ @click="syncVideoChange">同步视频</el-button>
|
|
|
<el-popover placement="top" :width="400" trigger="click">
|
|
|
<template #reference>
|
|
|
- <el-button style="margin-right: 16px" @click="viewStatusChange">查看状态</el-button>
|
|
|
+ <el-button style="margin-right: 16px" @click="viewStatusChange"
|
|
|
+ v-action="'video.VideoSeriesWechatCheck.medialink'">查看状态</el-button>
|
|
|
</template>
|
|
|
<div class="flex items-center">
|
|
|
<div class="dot-success"></div>
|
|
@@ -82,21 +95,31 @@ const colorType = (data: object) => {
|
|
|
}
|
|
|
}
|
|
|
const current = ref({})
|
|
|
+const wxcurrent = ref({})
|
|
|
+
|
|
|
+const changeSoure = () => {
|
|
|
+ viewStatus.value = !viewStatus.value
|
|
|
+ current.value = {}
|
|
|
+ wxcurrent.value = {}
|
|
|
+ checkAll.value = false
|
|
|
+ videoChoose.value = []
|
|
|
+}
|
|
|
// 查看状态
|
|
|
const viewStatusChange = () => {
|
|
|
current.value = {}
|
|
|
+ wxcurrent.value = {}
|
|
|
viewStatus.value = true
|
|
|
checkAll.value = false
|
|
|
videoChoose.value = []
|
|
|
}
|
|
|
// 同步视频
|
|
|
const syncVideoChange = () => {
|
|
|
+ viewStatus.value = false
|
|
|
const series_ids = videoChoose.value.map(e => e.id)
|
|
|
videoStockWechatCheckVideoSeriesSyncWechat({ series_ids }).then(res => {
|
|
|
console.log(res);
|
|
|
ElMessage.success(res.message)
|
|
|
})
|
|
|
- viewStatus.value = false
|
|
|
console.log(videoChoose.value, series_ids, 'videoChoosevideoChoose');
|
|
|
}
|
|
|
const initVideoList = (params: object) => {
|
|
@@ -122,10 +145,11 @@ const videoShow = (source: object) => {
|
|
|
}
|
|
|
const videoShowWx = (source: object) => {
|
|
|
console.log(source);
|
|
|
+ wxcurrent.value = videoChoose.value.find(el => el.public_video_url == source.public_video_url) ?? {}
|
|
|
videoStockWechatCheckVideoSeriesMedialink({ series_id: source.id }).then(res => {
|
|
|
console.log(res);
|
|
|
- current.value = videoChoose.value.find(el => el.public_video_url == source.public_video_url) ?? {}
|
|
|
- current.value.public_video_url = res.data
|
|
|
+ wxcurrent.value = videoChoose.value.find(el => el.public_video_url == source.public_video_url) ?? {}
|
|
|
+ wxcurrent.value.wxpublic_video_url = res.data
|
|
|
})
|
|
|
}
|
|
|
|