xbx #218

Merged
theluyuan merged 2 commits from xbx into master 2020-12-02 17:04:29 +08:00
3 changed files with 13 additions and 2 deletions
Showing only changes of commit 95d91f66be - Show all commits

View File

@ -1247,3 +1247,7 @@ export async function share() {
message.error(res.msg);
}
}
export async function addshareClick(videoid:number) {
await get("addshareClick",{videoid})
}

View File

@ -126,7 +126,7 @@
}
</style>
<script lang="ts">
import { share } from '@/api';
import { addshareClick, share } from '@/api';
import router from '@/router';
import { useI18n } from '@/utils/i18n';
import { defineComponent, onMounted, onUpdated, ref, watch } from 'vue';
@ -139,6 +139,9 @@ export default defineComponent({
},
title: {
type: String
},
vid:{
type: Number
}
},
setup(props, ctx){
@ -191,7 +194,11 @@ export default defineComponent({
}else {
url = `https://www.facebook.com/sharer/sharer.php?%20u=${res.shareUrl}&t=${res.shareTitle}`
}
window.open(url, "_blank")
if(props.vid){
addshareClick(props.vid)
}
})
}
function show(){

View File

@ -1,7 +1,7 @@
<template>
<div class="videoinfo">
<div class="info">
<VideoPlay :title="result.title" :url="result.fileid"></VideoPlay>
<VideoPlay :title="result.title" :vid="result.videoid" :url="result.fileid"></VideoPlay>
<VideoCont :videoid="result.videoid" :yuanyin="result.statusdesc" :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
</div>
<VideoReview :videoinfo="result.score" class="review" v-if="result.status == 1"></VideoReview>