3.25提交
This commit is contained in:
@@ -153,6 +153,7 @@ import isAndroid from "@/utils/platform.js";
|
||||
const isFirstDownload = ref(false);
|
||||
const path=ref('');
|
||||
const from=ref('');
|
||||
const tags = ref('');
|
||||
const pptVisible = ref(false);
|
||||
const nativeDownloadMaskView = ref(null);
|
||||
const nativeDownloadPopupView = ref(null);
|
||||
@@ -640,7 +641,7 @@ onShow(() => {
|
||||
console.log('canDownload');
|
||||
console.log(canDownload.value);
|
||||
if(!canDownload.value){
|
||||
ganDanFileDetials();
|
||||
ganDanFileDetials(true);
|
||||
}else{
|
||||
if(!hasDownload.value){
|
||||
downloadGanDanFile('auto');
|
||||
@@ -991,6 +992,17 @@ const collection = () => {
|
||||
title: "收藏成功",
|
||||
icon: "none",
|
||||
});
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "collect",
|
||||
page_type: "肝胆课件",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option: tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
ganDanFileDetials();
|
||||
}
|
||||
});
|
||||
@@ -1154,19 +1166,45 @@ const downLoadByType=()=>{
|
||||
const downloadGanDanFile = (type) => {
|
||||
showPptDownloadTip();
|
||||
let order_id='';
|
||||
let event_val=0;
|
||||
let event_unit='';
|
||||
if(type=='free'){
|
||||
order_id='FREE';
|
||||
event_val=0;
|
||||
event_unit='FREE';
|
||||
} else if(type=='welfare'){
|
||||
order_id='USEWELFARENUM';
|
||||
event_val=0;
|
||||
event_unit='USEWELFARENUM';
|
||||
}else if(type=='freeRecord'){
|
||||
order_id='FREERECORD';
|
||||
event_val=0;
|
||||
event_unit='FREERECORD';
|
||||
}else if(type=="auto"){
|
||||
order_id= orderId.value;
|
||||
event_val=orderInfo.value.price;
|
||||
event_unit='分';
|
||||
}else if(type=="reDownload"){
|
||||
order_id=orderInfo.value.order.order_id+"&R";
|
||||
event_val=0;
|
||||
event_unit='REDOWNLOAD';
|
||||
}
|
||||
|
||||
console.log('1218');
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "order_gdfile_download",
|
||||
page_type: "肝胆课件",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option: tags.value,
|
||||
event_val:0,
|
||||
event_unit:'',
|
||||
number:1,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
api.downloadGanDanFileV2({
|
||||
file_uuid: uuid.value,
|
||||
order_id: order_id,
|
||||
@@ -1310,11 +1348,25 @@ const base64ToFile=(base64Str, fileName, callback)=>{
|
||||
|
||||
|
||||
|
||||
const ganDanFileDetials = async () => {
|
||||
const ganDanFileDetials = async (flag = false) => {
|
||||
const res = await api.ganDanFileDetials({
|
||||
file_uuid: uuid.value,
|
||||
});
|
||||
if (res.code == 200) {res.data
|
||||
if (res.code == 200) {
|
||||
tags.value = res.data.tags?res.data.tags:'';
|
||||
if(flag){
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "detail_page",
|
||||
page_type: "肝胆课件",
|
||||
resource_name:res.data.name,
|
||||
resource_option: tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
}
|
||||
orderInfo.value = res.data;
|
||||
// 设置分享文案
|
||||
shareTitle.value = res.data.name;
|
||||
@@ -1478,6 +1530,17 @@ const resumeDownloadingTasks = () => {
|
||||
// ===== 分享到微信 =====
|
||||
const shareToWechat = () => {
|
||||
// #ifdef APP-PLUS
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: "肝胆课件",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option: tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
uni.downloadFile({
|
||||
url: 'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
||||
success: function (res) {
|
||||
@@ -1560,6 +1623,17 @@ const shareToWechat = () => {
|
||||
// ===== 分享到朋友圈 =====
|
||||
const shareToMoments = () => {
|
||||
// #ifdef APP-PLUS
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: "肝胆课件",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option: tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
uni.downloadFile({
|
||||
url: 'https://doc.igandan.com/app/html/img/2016/20160714132557.png',
|
||||
success: function (res) {
|
||||
|
||||
Reference in New Issue
Block a user