Commit 10192787 authored by zhangyanni's avatar zhangyanni

授权相关去#试一下

parent 5e03753c
......@@ -244,7 +244,7 @@
this.maiDianFunc(2,1);
this.userInfo = this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null;
var ua = navigator.userAgent.toLowerCase(), that = this;
var urlData = document.location.href.split("#/")[0]+"#/guessDetail?id="+data.guessId+"&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=1",
var urlData = document.location.origin+"/guessDetail?id="+data.guessId+"&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=1",
shareTitle=data.guessState==1?'我正在参与科创竞猜,快上车和我一起玩儿,可赢微信红包。':data.guessState==2?'一个人猜的是寂寞,和我一起来成为科创“神算子”才更带劲儿。':data.guessState==3&&data.isSelect?'彪悍的人生不需要解释,赢竞猜的心情要你知道。来一起高兴高兴!':'';
if(shareTitle){
if (ua.match(/MicroMessenger/i) == "micromessenger") {
......@@ -297,7 +297,7 @@
configFunc() {
let appurlLink = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) ? window.entryUrl : window.location.href;
let params = {
appUrl: appurlLink //document.location.href.split("#")[0]+"/?#"+document.location.href.split("#")[1]
appUrl: appurlLink
}, that = this;
commonApi.getConfigAxios(params).then((res) => {
if (res.code == 0) {
......@@ -317,7 +317,7 @@
});
let dataVal,
urlData = document.location.href.split("#/")[0]+"#/guessDetail?id="+this.currentData.guessId+ "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=1",
urlData = document.location.origin+"/guessDetail?id="+this.currentData.guessId+ "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=1",
title =this.currentData.guessState==1?'我正在参与科创竞猜,快上车和我一起玩儿,可赢微信红包。':this.currentData.guessState==2?'一个人猜的是寂寞,和我一起来成为科创“神算子”才更带劲儿。':this.currentData.guessState==3&&this.currentData.isSelect?'彪悍的人生不需要解释,赢竞猜的心情要你知道。来一起高兴高兴!':'';
if (this.currentData) {
dataVal = {
......@@ -408,7 +408,7 @@
//
var userAgent = navigator.userAgent, shareUrl;
var isMini = /miniProgram/i.test(userAgent);
var urlData = document.location.href.split("#/")[0]+"#/guessDetail?id="+this.currentData.guessId + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=1",
var urlData = document.location.origin+"/guessDetail?id="+this.currentData.guessId + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=1",
title = this.currentData.guessState==1?'我正在参与科创竞猜,快上车和我一起玩儿,可赢微信红包。':this.currentData.guessState==2?'一个人猜的是寂寞,和我一起来成为科创“神算子”才更带劲儿。':this.currentData.guessState==3&&this.currentData.isSelect?'彪悍的人生不需要解释,赢竞猜的心情要你知道。来一起高兴高兴!':'';
if (isMini) {
that.dialogVisible = true;
......
......@@ -1344,7 +1344,7 @@
title: data.reportTitle,
desc: this.$t("shareInfo.industryReportZy"),
// 如果是微信该link的域名必须要在微信后台配置的安全域名之内的。
link: (document.location.href.split("#/")[0] + "#/industryReportDetail") + "?id=" + data.reportId + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=" + query.rTargetType,
link: (document.location.origin + "/industryReportDetail") + "?id=" + data.reportId + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=" + query.rTargetType,
// icon: this.config.url,
// 不要过于依赖以下两个回调,很多浏览器是不支持的
success: function () {
......@@ -1358,7 +1358,7 @@
title: data.reportTitle,
desc: this.$t("shareInfo.industryReportZy"),
// 如果是微信该link的域名必须要在微信后台配置的安全域名之内的。
link: (document.location.href.split("#/")[0] + "#/industryReportDetail") + "?id=" + data.reportId + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType=" + query.rTargetType,
link: (document.location.origin+ "/industryReportDetail") + "?id=" + data.reportId + "&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 () {
......@@ -1389,7 +1389,7 @@
//
var userAgent = navigator.userAgent, shareUrl;
var isMini = /miniProgram/i.test(userAgent);
var urlData = (document.location.href.split("#/")[0] + "#/industryReportDetail") + "?id=" + this.currentData.reportId + "&lang=" + this.lang;
var urlData = (document.location.origin + "/industryReportDetail") + "?id=" + this.currentData.reportId + "&lang=" + this.lang;
if (isMini) {
if (data == 2) {
shareUrl = '/pages/industryReport/industryReport?isShareIndustryReport=true&url=' + JSON.stringify(query);
......@@ -1460,7 +1460,7 @@
configFunc() {
let params = {
appUrl: window.location.href //document.location.href.split("#")[0]+"/?#"+document.location.href.split("#")[1]
appUrl: window.location.href
}, that = this;
commonApi.getConfigAxios(params).then((res) => {
if (res.code == 0) {
......@@ -1484,7 +1484,7 @@
desc: this.$t("shareInfo.industryReportZy"), // 分享描述
link: (document.location.href.split("#/")[0] + "#/industryReportDetail") + "?id=" + this.currentData.reportId + "&rDeviceId=" + that.publicFun.getCookie("getGuid32") + "&rEmpId=" + (that.userInfo ? that.userInfo.empId : undefined) + "&rTargetType=1", // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
link: (document.location.origin + "/industryReportDetail") + "?id=" + this.currentData.reportId + "&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"),// 分享图标
......@@ -1548,7 +1548,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.split("#/")[0] + "#/industryReportDetail") + "?id=" + this.currentData.reportId + "&rDeviceId=" + this.publicFun.getCookie("getGuid32") + "&rEmpId=" + (this.userInfo ? this.userInfo.empId : undefined) + "&rTargetType="
link: (document.location.origin + "/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;
......@@ -1557,7 +1557,7 @@
}
var that = this;
if (this.currentData) {
var url = document.location.href.split("#/")[0] + "#/industryReportDetail?id=" + this.currentData.reportId;
var url = document.location.origin + "/industryReportDetail?id=" + this.currentData.reportId;
let dataValObj = {
title: this.currentData.reportTitle, // 分享标题 that.detailInfo.projectName
......
......@@ -22,11 +22,11 @@
val.forEach((item)=>{
arr.push(item.split("=")[1]);
})
if(document.location.href.split("#")[0].indexOf("index.html")>-1){
window.location.href = document.location.origin+"/exchangeAuthPage?code="+arr[0]+"&state="+arr[1];
}else{
window.location.href = document.location.href.split("/#")[0].split("?")[0]+"/#/exchangeAuthPage?code="+arr[0]+"&state="+arr[1];
}
// if(document.location.href.split("#")[0].indexOf("index.html")>-1){
// window.location.href = document.location.origin+"/exchangeAuthPage?code="+arr[0]+"&state="+arr[1];
// }else{
// window.location.href = document.location.origin+"/exchangeAuthPage?code="+arr[0]+"&state="+arr[1];
// }
var _this = this;
setTimeout(function(){
if(arr[0]!=null||arr[0]!=undefined){
......
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