3.25提交
This commit is contained in:
@@ -74,6 +74,8 @@ const summary = ref("");
|
||||
const shareLink = ref("");
|
||||
const shareImg = ref("");
|
||||
const shareTitle = ref("");
|
||||
const type = ref("");
|
||||
const tags = ref("");
|
||||
const goBack = () => {
|
||||
uni.navigateBack({
|
||||
fail() {
|
||||
@@ -100,6 +102,12 @@ onLoad((query) => {
|
||||
if (query.title) {
|
||||
title.value = query.title;
|
||||
}
|
||||
if (query.tags) {
|
||||
tags.value = query.tags;
|
||||
}
|
||||
if (query.type) {
|
||||
type.value = query.type;
|
||||
}
|
||||
if (query.share == 1) {
|
||||
canShare.value = true;
|
||||
}
|
||||
@@ -129,6 +137,18 @@ onLoad((query) => {
|
||||
} else if (query.type == "live") {
|
||||
shareTitle.value = "肝胆相照直播:" + query.sharetitle;
|
||||
summary.value = shareTitle.value;
|
||||
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "detail_page",
|
||||
page_type: "会议直播",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
}else if(query.type=='news'){
|
||||
shareTitle.value = query.sharetitle;
|
||||
summary.value ='';
|
||||
@@ -668,6 +688,16 @@ function closeNativePopup() {
|
||||
// 分享到微信
|
||||
const shareToWechat = () => {
|
||||
// #ifdef APP-PLUS
|
||||
if(type.value == "live"){
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: "会议直播",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
});
|
||||
}
|
||||
// 使用系统分享
|
||||
uni.downloadFile({
|
||||
url: shareImg.value,
|
||||
@@ -770,6 +800,16 @@ onUnload(() => {
|
||||
// 分享到朋友圈
|
||||
const shareToMoments = () => {
|
||||
// #ifdef APP-PLUS
|
||||
if(type.value == "live"){
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: "会议直播",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
});
|
||||
}
|
||||
uni.downloadFile({
|
||||
url: shareImg.value,
|
||||
success: function (res) {
|
||||
|
||||
@@ -132,6 +132,7 @@ const webviewTopPx = ref(88);
|
||||
const webviewBottomPx = ref(WEBVIEW_BOTTOM_PX);
|
||||
const usePlusWebview = ref(false);
|
||||
const appPlusWebview = ref(null);
|
||||
const tags = ref('');
|
||||
|
||||
const webviewStyles = ref({
|
||||
width: "100%",
|
||||
@@ -221,9 +222,21 @@ const getCollect = () => {
|
||||
});
|
||||
if (type.value == "huanjiao_news") {
|
||||
getNewsDetail();
|
||||
|
||||
} else {
|
||||
getKePuCollection();
|
||||
}
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "collect",
|
||||
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -274,9 +287,21 @@ const getAgree = () => {
|
||||
.then((res) => {
|
||||
if (type.value == "huanjiao_news") {
|
||||
getNewsDetail();
|
||||
|
||||
} else {
|
||||
getKePuCollection();
|
||||
}
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "like",
|
||||
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
});
|
||||
};
|
||||
const getDisagree = () => {
|
||||
@@ -305,7 +330,7 @@ const getOutRead = () => {
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
const getNewsDetail = () => {
|
||||
const getNewsDetail = (flag=false) => {
|
||||
api
|
||||
.getNewsDetail({
|
||||
uuid: uuid.value,
|
||||
@@ -313,6 +338,20 @@ const getNewsDetail = () => {
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
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:shareTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
}
|
||||
isCollection.value = res.data.isCollection;
|
||||
readnum.value = res.data.readnum;
|
||||
agreenum.value = res.data.agreenum;
|
||||
@@ -327,7 +366,7 @@ const fromatNumber = (number) => {
|
||||
return (number / 10000).toFixed(1) + "w";
|
||||
}
|
||||
};
|
||||
const getKePuCollection = () => {
|
||||
const getKePuCollection = (flag=false) => {
|
||||
api
|
||||
.getKePuCollection({
|
||||
uuid: uuid.value,
|
||||
@@ -336,6 +375,19 @@ const getKePuCollection = () => {
|
||||
.then((res) => {
|
||||
console.log(res.data);
|
||||
if (res.code == 200) {
|
||||
if(flg){
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "detail_page",
|
||||
page_type: "患教文库",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
}
|
||||
isCollection.value = res.data.isCollection;
|
||||
readnum.value = res.data.readnum;
|
||||
agreenum.value = res.data.agreenum;
|
||||
@@ -442,6 +494,9 @@ onLoad((query) => {
|
||||
if (query.type) {
|
||||
type.value = query.type;
|
||||
}
|
||||
if (query.tags) {
|
||||
tags.value = query.tags;
|
||||
}
|
||||
user_uuid.value = userInfo.uuid;
|
||||
if (query.title) {
|
||||
title.value = query.title;
|
||||
@@ -458,9 +513,9 @@ onLoad((query) => {
|
||||
backgroundColor.value = "linear-gradient(to bottom,'#fff' , '#398775')";
|
||||
}
|
||||
if (type.value == "huanjiao_news") {
|
||||
getNewsDetail();
|
||||
getNewsDetail(true);
|
||||
} else {
|
||||
getKePuCollection();
|
||||
getKePuCollection(true);
|
||||
}
|
||||
getOutRead();
|
||||
|
||||
@@ -1303,6 +1358,18 @@ function closeSelectNativePopup() {
|
||||
// 分享到微信
|
||||
const shareToWechat = () => {
|
||||
addpoint();
|
||||
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
// #ifdef APP-PLUS
|
||||
// 使用系统分享
|
||||
uni.downloadFile({
|
||||
@@ -1421,6 +1488,18 @@ onUnload(() => {
|
||||
// 分享到朋友圈
|
||||
const shareToMoments = () => {
|
||||
addpoint();
|
||||
uni.sendNativeEvent("portraitReport",{
|
||||
msg:{
|
||||
event_nickname: "share",
|
||||
page_type: type.value == "huanjiao_news" ? "肝胆新闻" : "患教文库",
|
||||
resource_name:shareTitle.value,
|
||||
resource_option:tags.value,
|
||||
},
|
||||
},
|
||||
(ret) => {
|
||||
console.log(ret);
|
||||
});
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
uni.downloadFile({
|
||||
url: shareImg.value,
|
||||
|
||||
Reference in New Issue
Block a user