| | |
| | | import storage from "@/utils/storage.js"; |
| | | import TopBar from "@/components/TopBar.vue"; |
| | | import { nextTick } from "vue"; |
| | | |
| | | import {getVideoCover } from "@/api/common.js" |
| | | export default { |
| | | components: {TopBar}, |
| | | computed: { |
| | |
| | | shareUser: userInfo.id |
| | | } |
| | | saveShare(data) |
| | | return { |
| | | title: videoInfo.title, |
| | | path: `/pages/tabbar/index/home?videoId=${videoInfo.id}&userId=${userInfo.id}`, |
| | | } |
| | | // getVideoCover(videoInfo.id).then(res =>{ |
| | | // if(res.statusCode === 200){ |
| | | // imageUrl = res.data.data |
| | | // console.log(imageUrl) |
| | | // return { |
| | | // title: videoInfo.title, |
| | | // path: `/pages/tabbar/index/home?videoId=${videoInfo.id}&userId=${userInfo.id}`, |
| | | // imageUrl: imageUrl |
| | | // } |
| | | // } |
| | | |
| | | // }) |
| | | console.log(videoInfo) |
| | | return { |
| | | title: videoInfo.title, |
| | | path: `/pages/tabbar/index/home?videoId=${videoInfo.id}&userId=${userInfo.id}`, |
| | | imageUrl: videoInfo.coverUrl |
| | | } |
| | | // 保存分享记录 |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | // 截取视频当前帧 |
| | | captureVideoFrame(videoCtx) { |
| | | return new Promise((resolve) => { |
| | | videoCtx.requestFrame(() => { |
| | | wx.canvasToTempFilePath({ |
| | | canvasId: 'shareCanvas', |
| | | success: (res) => resolve(res), |
| | | fail: () => resolve({ tempFilePath: '/assets/default-cover.jpg' }) |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | requestFullScreen(id,item){ |
| | | console.log(item) |
| | | |