分享请求接口
This commit is contained in:
parent
564ae0a0e7
commit
95d91f66be
@ -1247,3 +1247,7 @@ export async function share() {
|
|||||||
message.error(res.msg);
|
message.error(res.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function addshareClick(videoid:number) {
|
||||||
|
await get("addshareClick",{videoid})
|
||||||
|
}
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { share } from '@/api';
|
import { addshareClick, share } from '@/api';
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import { useI18n } from '@/utils/i18n';
|
import { useI18n } from '@/utils/i18n';
|
||||||
import { defineComponent, onMounted, onUpdated, ref, watch } from 'vue';
|
import { defineComponent, onMounted, onUpdated, ref, watch } from 'vue';
|
||||||
@ -139,6 +139,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String
|
type: String
|
||||||
|
},
|
||||||
|
vid:{
|
||||||
|
type: Number
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup(props, ctx){
|
setup(props, ctx){
|
||||||
@ -191,7 +194,11 @@ export default defineComponent({
|
|||||||
}else {
|
}else {
|
||||||
url = `https://www.facebook.com/sharer/sharer.php?%20u=${res.shareUrl}&t=${res.shareTitle}`
|
url = `https://www.facebook.com/sharer/sharer.php?%20u=${res.shareUrl}&t=${res.shareTitle}`
|
||||||
}
|
}
|
||||||
|
|
||||||
window.open(url, "_blank")
|
window.open(url, "_blank")
|
||||||
|
if(props.vid){
|
||||||
|
addshareClick(props.vid)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function show(){
|
function show(){
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="videoinfo">
|
<div class="videoinfo">
|
||||||
<div class="info">
|
<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>
|
<VideoCont :videoid="result.videoid" :yuanyin="result.statusdesc" :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
|
||||||
</div>
|
</div>
|
||||||
<VideoReview :videoinfo="result.score" class="review" v-if="result.status == 1"></VideoReview>
|
<VideoReview :videoinfo="result.score" class="review" v-if="result.status == 1"></VideoReview>
|
||||||
|
Loading…
Reference in New Issue
Block a user