3.25提交
This commit is contained in:
@@ -273,6 +273,7 @@ import otherHost from "@/utils/otherHost";
|
||||
const selectedPatients = ref([]);
|
||||
const video_uuid = ref("");
|
||||
const videoInfo = ref({});
|
||||
const tags = ref("");
|
||||
const networkVisible = ref(false);
|
||||
const networkContent = ref("");
|
||||
const pointVisible = ref(false);
|
||||
@@ -336,6 +337,7 @@ const startDownload = (index) => {
|
||||
hasDownload.value = true;
|
||||
isVideoDownloadRecord.value=true;
|
||||
downLoadStatus.value = 'loading';
|
||||
|
||||
const task = uni.downloadFile({
|
||||
url: taskItem.url,
|
||||
success: (res1) => {
|
||||
@@ -471,6 +473,20 @@ const useWelfareNum = async () => {
|
||||
if (res.code == 1) {
|
||||
uni.showToast({ title: "使用次数成功", icon: "none" });
|
||||
welfareNum.value--;
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "viorder_deo_download",
|
||||
page_type: "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:'',
|
||||
event_unit:'免费次数',
|
||||
number:1,
|
||||
event_val:1,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
addDownloadTask({
|
||||
url: videoSrc.value,
|
||||
id: video_uuid.value,
|
||||
@@ -487,9 +503,22 @@ const onVideoError = (e) => {
|
||||
// });
|
||||
videoSrc.value= videoSrc.value.replace('.mp4', '.m3u8');
|
||||
};
|
||||
const videoDetail = async () => {
|
||||
const videoDetail = async (flag = false) => {
|
||||
const res = await api.videoDetail({ video_uuid: video_uuid.value });
|
||||
if (res.code == 200) {
|
||||
if(flag) {
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "detail_page",
|
||||
page_type: "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:''
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
}
|
||||
const userInfo = uni.getStorageSync("userInfo");
|
||||
videoInfo.value = res.video;
|
||||
|
||||
@@ -519,6 +548,17 @@ const collection = async () => {
|
||||
});
|
||||
if (res.code == 200) {
|
||||
uni.showToast({ title: "收藏成功", icon: "none" });
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "collect",
|
||||
page_type: "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:'',
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
videoDetail();
|
||||
}
|
||||
};
|
||||
@@ -655,11 +695,10 @@ onShow(() => {
|
||||
if (activeTab.value == "comment") {
|
||||
videoCommentListV2();
|
||||
}
|
||||
if(from.value != 'download') {
|
||||
videoDetail();
|
||||
if (from.value != "download") {
|
||||
videoDetail(true);
|
||||
}
|
||||
uni.hideLoading();
|
||||
|
||||
});
|
||||
|
||||
const shareRef = ref();
|
||||
@@ -734,6 +773,18 @@ const shareToWechat = () => {
|
||||
if(type.value == 'patientVideo') {
|
||||
addpoint();
|
||||
}
|
||||
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:'',
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
// #ifdef APP-PLUS
|
||||
// 使用系统分享
|
||||
uni.downloadFile({
|
||||
@@ -834,6 +885,17 @@ const shareToMoments = () => {
|
||||
if(type.value == 'patientVideo') {
|
||||
addpoint();
|
||||
}
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:'',
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
// #ifdef APP-PLUS
|
||||
uni.downloadFile({
|
||||
url: isAndroid?docUrl + videoInfo.value.imgpath:'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
||||
@@ -944,6 +1006,9 @@ onLoad((options) => {
|
||||
if(options.type) {
|
||||
type.value = options.type;
|
||||
}
|
||||
if(options.tags) {
|
||||
tags.value = options.tags;
|
||||
}
|
||||
uni.getSystemInfo({
|
||||
success: function (res) {
|
||||
videoWidth.value = res.windowWidth; // 窗口宽度
|
||||
@@ -1008,6 +1073,20 @@ const payVideoDownload = async () => {
|
||||
const res = await api.payVideoDownload({ video_uuid: video_uuid.value });
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "viorder_deo_download",
|
||||
page_type: "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:'',
|
||||
event_unit:'积分',
|
||||
number:1,
|
||||
event_val:videoInfo.value.point,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
addDownloadTask({
|
||||
url: videoSrc.value,
|
||||
id: video_uuid.value,
|
||||
@@ -1089,6 +1168,17 @@ const addCommentV2 = async () => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({ title: "评论成功", icon: "none" });
|
||||
commentText.value = "";
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "comment",
|
||||
page_type: "肝胆视频",
|
||||
resource_name:videoInfo.value.name,
|
||||
resource_option:tags.value?tags.value:'',
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
videoCommentListV2();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user