Commit 68195447 authored by zhengke's avatar zhengke
parents 24390e3a ec99fd72
......@@ -157,31 +157,45 @@
// let href = 'http://activity.oytour.com/html/Appmd/draw.html?customerId=1549&accountId=1182&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NzE5NzA5MDUuMCwiZXhwIjoxNTc0NTYyOTA1LjAsInVzZXJJbmZvIjp7InVpZCI6IjExODIiLCJyZXF1ZXN0RnJvbSI6M319.vlAcXCx4C_0KOmfLm4cLRxU28gTHmuMK6jgJtwjsSPM&secretKey=5d5e16254bd741c486fe2b83b42171d2&platform=app';
let href = window.location.href;
// let href='http://127.0.0.1:5500/html/GT_activities.html?customerId=1549&accountId=1182&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NzM0NjY2NjMuMCwiZXhwIjoxNTczNTUzMDYzLjAsInVzZXJJbmZvIjp7InVpZCI6IjExODIiLCJyZXF1ZXN0RnJvbSI6NH19.hX2b2MqSWYmWS0k3YsthxW-T6UxarIm5rdbqCVQtxdQ&secretKey=5d5e16254bd741c486fe2b83b42171d2&platform=app';
// 如果进入页面没有登录的参数 处理跳到h5页面登录
if(href.split('?')[1]){
if(href.split('?')[1].indexOf('customerId') == -1 || href.split('?')[1].indexOf('accountId') == -1 ||
href.split('?')[1].indexOf('token') == -1||href.split('?')[1].indexOf('secretKey') == -1||
href.split('?')[1].indexOf('platform') == -1){
let userInfo={};
let platform = "H5";
if(localStorage.userInfo){
try{
userInfo=JSON.parse(localStorage.userInfo);
if(!userInfo.customerId){
window.location.href = 'http://activity.oytour.com/html/login.html';
}
}catch (e) {
window.location.href = 'http://activity.oytour.com/html/login.html';
}
}
else{
window.location.href = 'http://activity.oytour.com/html/login.html';
}else{
// 如果进入页面没有登录的参数 处理跳到h5页面登录
if(href.split('?')[1]){
if(href.split('?')[1].indexOf('customerId') == -1 || href.split('?')[1].indexOf('accountId') == -1 ||
href.split('?')[1].indexOf('token') == -1||href.split('?')[1].indexOf('secretKey') == -1||
href.split('?')[1].indexOf('platform') == -1){
window.location.href = 'http://activity.oytour.com/html/login.html';
}
}
else{
window.location.href = 'http://activity.oytour.com/html/login.html';
}
}
let param = href.split('?')[1].split("&") ? href.split('?')[1].split("&") : null;
let param = href.split('?')[1].split("&") ? href.split('?')[1].split("&") : null;
// console.log(href.split('?')[1].split("&").indexOf('customerId'))
let userInfo ={
customerId: param[0].split('=')[1],
accountId: param[1].split('=')[1],
token: param[2].split('=')[1],
secretKey: param[3].split('=')[1],
// console.log(href.split('?')[1].split("&").indexOf('customerId'))
userInfo ={
customerId: param[0].split('=')[1],
accountId: param[1].split('=')[1],
token: param[2].split('=')[1],
secretKey: param[3].split('=')[1],
}
platform = param[4].split('=')[1] //获取从哪里跳过来的
}
let platform = param[4].split('=')[1] //获取从哪里跳过来的
if(platform == 'H5'){
var ua = navigator.userAgent.toLowerCase();
if(platform == 'H5' && ua.match(/MicroMessenger/i)!="micromessenger"){
$('.wx_bg').css('display',"block");
}
var end = '';
......
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