Commit a2ead162 authored by zhangyanni's avatar zhangyanni

分享

parent 11593e8c
......@@ -253,10 +253,9 @@
});
let dataVal,
hrefUrl = (document.location.href.split("#/")[0]+"#/industryReportDetail")+"?id="+this.detailInfo.reportId+"&lang="+this.lang;
let dataVal,hrefUrl = (document.location.href.split("#/")[0]+"#/industryReportDetail")+"?id="+this.detailInfo.reportId+"&lang="+this.lang;
// hrefUrl = this.isIndex?(document.location.href.split("#/")[0]+"#/industryReportDetail"+"?id="+this.detailInfo.reportId):document.location.href;
console.log(hrefUrl)
if(this.detailInfo){
if(this.pageType==1){
dataVal = {
......
......@@ -184,7 +184,7 @@
//
var userAgent = navigator.userAgent, shareUrl;
var isMini = /miniProgram/i.test(userAgent);
var urlData = document.location.href + "?lang=" + this.lang;
var urlData = (document.location.href.split("#/")[0]+"#/industryReportDetail")+"?id="+this.currentData.reportId + "?lang=" + this.lang;
if (isMini) {
if (data == 2) {
shareUrl = '/pages/industryReport/industryReport?isShareIndustryReport=true&url=' + JSON.stringify(query);
......@@ -229,7 +229,7 @@
call(data, command) {
this.currentData = data;
let query = this.$route.query;
let query = this.$route.query,hrefUrl = (document.location.href.split("#/")[0]+"#/industryReportDetail")+"?id="+this.currentData.reportId+"&lang="+this.lang;
query.title = data.reportTitle;
query.lang = this.lang;
query.rDeviceId = this.publicFun.getCookie("getGuid32");
......@@ -249,7 +249,7 @@
title: data.reportTitle,
desc: this.$t("shareInfo.industryReportZy"),
// 如果是微信该link的域名必须要在微信后台配置的安全域名之内的。
link: document.location.href + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=" + query.rTargetType,
link: hrefUrl + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=" + query.rTargetType,
// icon: this.config.url,
// 不要过于依赖以下两个回调,很多浏览器是不支持的
success: function () {
......@@ -263,7 +263,7 @@
title: data.reportTitle,
desc: this.$t("shareInfo.industryReportZy"),
// 如果是微信该link的域名必须要在微信后台配置的安全域名之内的。
link: document.location.href + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=" + query.rTargetType,
link: hrefUrl + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=" + query.rTargetType,
imgUrl: this.lang == 1 ? (this.frontImgUrl + "/public/industryReportShareZh.jpg") : (this.frontImgUrl + "/public/industryReportShareEn.jpg"),// 图片, 默认取网页中第一个img标签
fnDoShare(type) {
setTimeout(function () {
......@@ -384,7 +384,7 @@
title: data.reportTitle,
desc: this.$t("shareInfo.industryReportZy"),
img: this.lang == 1 ? (this.frontImgUrl + "/public/industryReportShareZh.jpg") : (this.frontImgUrl + "/public/industryReportShareEn.jpg"),
link: document.location.href + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType="
link: (document.location.href.split("#/")[0]+"#/industryReportDetail")+"?id="+this.currentData.reportId + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType="
}
if (Object.keys(this.configVal).length != 0) {
this.isShare = true;
......@@ -393,7 +393,7 @@
}
var that = this;
if (this.currentData) {
var url = document.location.href;
var url = (document.location.href.split("#/")[0]+"#/industryReportDetail")+"?id="+this.currentData.reportId;
let dataValObj = {
title: this.currentData.reportTitle, // 分享标题 that.detailInfo.projectName
......@@ -581,13 +581,14 @@
});
if (this.currentData) {
var hrefUrl = (document.location.href.split("#/")[0]+"#/industryReportDetail")+"?id="+this.currentData.reportId+"&lang="+this.lang;
let dataVal = {
title: that.currentData.reportTitle, // 分享标题
desc: this.$t("shareInfo.industryReportZy"), // 分享描述
link: document.location.href + "&rDeviceId=" + that.publicFun.getCookie("getGuid32") + "&rEmpId=" + (that.userInfo ? that.userInfo.empId : undefined) + "&rTargetType=1", // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link: hrefUrl + "&rDeviceId=" + that.publicFun.getCookie("getGuid32") + "&rEmpId=" + (that.userInfo ? that.userInfo.empId : undefined) + "&rTargetType=1", // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: this.lang == 1 ? (this.frontImgUrl + "/public/industryReportShareZh.jpg") : (this.frontImgUrl + "/public/industryReportShareEn.jpg"),// 分享图标
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment