Commit 137ddeb5 authored by zhangyanni's avatar zhangyanni

去掉注释掉的href.split("#/"

parent f9f98ba0
......@@ -45,7 +45,7 @@
shareFunc(){
let params = {
appUrl:window.location.href //document.location.href.split("#")[0]+"/?#"+document.location.href.split("#")[1]
appUrl:window.location.href
};
api.getConfigAxios(params).then((res)=>{
if(res.code==0){
......
......@@ -250,7 +250,7 @@
configFunc(){
let params = {
appUrl:window.location.href //document.location.href.split("#")[0]+"/?#"+document.location.href.split("#")[1]
appUrl:window.location.href
},that = this;
api.getConfigAxios(params).then((res)=>{
if(res.code==0){
......
......@@ -86,7 +86,7 @@ Vue.prototype.publicFun= publicFun;
var type = navigator.appName,language;
var ismobile = publicFun.getCookie('ismobile');
if (typeof window.entryUrl === 'undefined' || window.entryUrl === '') {
window.entryUrl = location.href.split('#')[0];
window.entryUrl = location.origin;
}
if(ismobile == null){
ismobile = flag||ucFlag ? 1 : 0
......@@ -291,16 +291,6 @@ router.beforeEach((to, from, next) => {
if(to.name=="mineIndex"&&!publicFun.getUserInfoCookieType()&&publicFun.judgeBrandIsWechatOrHtml() == 1) router.replace({path:'/circleList'})
next();
document.body.scrollTop=document.documentElement.scrollTop=0;
// // 强制给index.html 加上时间戳
// if (document.URL.indexOf('t=') < 0) {
// let timestamp = (new Date()).valueOf(),hrefVal;
// if(to.path=="/"){
// hrefVal = document.location.href.split("#/")[0] + '#' + to.fullPath+'t=' + timestamp;
// }else{
// hrefVal = document.location.href.split("#/")[0]+'index.html?t=' + timestamp + '#' + to.fullPath;
// }
// window.location.href =hrefVal;
// }
if(to.path!=from.path){
cancelRequest.cancelRequest()
......
......@@ -17,11 +17,6 @@
val.forEach((item)=>{
arr.push(item.split("=")[1]);
})
// if(document.location.href.split("#")[0].indexOf("index.html")>-1){
// window.location.href = document.location.href.split("#")[0].split("?")[0]+"#/newPage?code="+arr[0]+"&state="+arr[1];
// }else{
// window.location.href = document.location.href.split("/#")[0].split("?")[0]+"/#/newPage?code="+arr[0]+"&state="+arr[1];
// }
var _this = this;
setTimeout(function(){
if(arr[0]!=null||arr[0]!=undefined){
......@@ -59,11 +54,7 @@
}
globalMsg.$emit('islogin',3);
} else{
// if(res.msg!=null){
// that.$router.push({path:"/bindAccount",query:{id:res.msg}});
// }else{
// window.location.href = document.location.href.split("#")[0].split("?")[0]+"#/loginByPhone";
// }
}
}else{
that.$toast(res.msg);
......@@ -71,10 +62,7 @@
}).catch((err)=>{
that.$toast(err);
})
}else{
// var dataUrl = document.location.href.split("#/")[0]+"#/newPage";
// window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="+encodeURIComponent(dataUrl)+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
}
}else{}
},2000)
}
......
......@@ -763,7 +763,7 @@
configFunc() {
let params = {
appUrl: window.location.href //document.location.href.split("#")[0]+"/?#"+document.location.href.split("#")[1]
appUrl: window.location.href
}, that = this;
api.getConfigAxios(params).then((res) => {
if (res.code == 0) {
......
......@@ -397,7 +397,7 @@
configFunc(){
let params = {
appUrl:window.location.href //document.location.href.split("#")[0]+"/?#"+document.location.href.split("#")[1]
appUrl:window.location.href
},that = this;
api.getConfigAxios(params).then((res)=>{
if(res.code==0){
......
......@@ -291,7 +291,7 @@
configFunc(data) {
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,true).then((res) => {
if (res.code == 0) {
......
......@@ -22,11 +22,6 @@
val.forEach((item)=>{
arr.push(item.split("=")[1]);
})
// if(document.location.href.split("#")[0].indexOf("index.html")>-1){
// window.location.href = document.location.origin+"/authPage?code="+arr[0]+"&state="+arr[1];
// }else{
// window.location.href = document.location.href.split("/#")[0].split("?")[0]+"/#/authPage?code="+arr[0]+"&state="+arr[1];
// }
var _this = this;
setTimeout(function(){
if(arr[0]!=null||arr[0]!=undefined){
......@@ -62,10 +57,7 @@
}).catch((err)=>{
that.$toast(err);
})
}else{
// var dataUrl = document.location.href.split("#/")[0]+"#/newPage";
// window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="+encodeURIComponent(dataUrl)+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
}
}else{}
},2000)
}
......
......@@ -22,11 +22,6 @@
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.origin+"/exchangeAuthPage?code="+arr[0]+"&state="+arr[1];
// }
var _this = this;
setTimeout(function(){
if(arr[0]!=null||arr[0]!=undefined){
......@@ -62,10 +57,7 @@
}).catch((err)=>{
that.$toast(err);
})
}else{
// var dataUrl = document.location.href.split("#/")[0]+"#/newPage";
// window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="+encodeURIComponent(dataUrl)+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
}
}else{}
},2000)
}
......
......@@ -17,12 +17,6 @@
val.forEach((item)=>{
arr.push(item.split("=")[1]);
})
// window.location.href = document.location.origin+"/newPage?code="+arr[0]+"&state="+arr[1];
// if(document.location.href.split("#")[0].indexOf("index.html")>-1){
// window.location.href = document.location.href.split("#")[0].split("?")[0]+"#/newPage?code="+arr[0]+"&state="+arr[1];
// }else{
// window.location.href = document.location.href.split("/#")[0].split("?")[0]+"/#/newPage?code="+arr[0]+"&state="+arr[1];
// }
var _this = this;
setTimeout(function(){
if(arr[0]!=null||arr[0]!=undefined){
......@@ -54,10 +48,7 @@
}).catch((err)=>{
that.$toast(err);
})
}else{
// var dataUrl = document.location.href.split("#/")[0]+"#/newPage";
// window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="+encodeURIComponent(dataUrl)+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
}
}else{}
},2000)
}
......
......@@ -768,7 +768,7 @@
configFunc(data) {
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) {
......
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