Commit 38a6dea7 authored by Mac's avatar Mac

修改token过期的跳转方式

parent 6fdb1bcc
......@@ -169,7 +169,7 @@
<!--<script type="text/javascript" src="js/countdown.js"></script>-->
<script type="text/javascript" src="../js/md5.js"></script>
<script type="text/javascript" src="../js/mian.js"></script>
<script src="../js/jquery.dataStatistics.js?r=efa5420042"></script>
<script src="../js/jquery.dataStatistics.js?r=efm54202"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script type="text/javascript" src="../js/layer/layer.js"></script>
<script type="text/javascript" src="../js/yql.js"></script>
......
......@@ -245,6 +245,7 @@
let price = param ? param[0].split('=')[1] : 0;
let couponId = param ? param[1].split('=')[1] : 0;
let platform = param ? param[2].split('=')[1] : 0;
let noClick = param ? param[3].split('=')[1] : 0;
$('.anniu').html('支付' + price + '元领取')
let buyIf = {}
// if (localStorage.buyInfo) {
......@@ -260,6 +261,8 @@
let RushbuyTime = localStorage.RushbuyTime ? JSON.parse(localStorage.RushbuyTime) : {
RushbuyTime: ''
}
$('#RushbuyTime').html(`有效期截止:` + RushbuyTime.RushbuyTime)
function move(t) {
......@@ -305,7 +308,17 @@
});
})
var that=this
console.log(noClick)
if(noClick == 1){ //0不执行 1为执行点击事件
that.btnClick()
}
$('.anniu').click(function() {
that.btnClick()
})
function btnClick() {
if (!isChecke) {
layer.msg('请同意活动说明');
return;
......@@ -325,6 +338,7 @@
time: 60000
});
}
$.ajax({
type: "POST",
url: `${getApiUrl().urlJava}api/appActivity/PanicBuyingCoupon`,
......@@ -407,7 +421,9 @@
layer.msg('登录已过期,请重新登录');
setTimeout(function() {
localStorage.removeItem("u");
window.location.href = 'https://activity.oytour.com/html/login.html';
window.location.href = `https://activity.oytour.com/html/login.html?redemptionPrice=${price}&couponId=${couponId}&platform=${platform}&jumpPay=${'1'}&r=opfr12123`;
// window.location.href = `./login.html?redemptionPrice=${price}&couponId=${couponId}&platform=${platform}&jumpPay=${'1'}&r=efr12123`;
}, 2000)
}
......@@ -425,12 +441,13 @@
layer.msg('登录已过期,请重新登录');
setTimeout(function() {
localStorage.removeItem("u");
window.location.href = 'https://activity.oytour.com/html/login.html?r=uj23123';
window.location.href = `https://activity.oytour.com/html/login.html?redemptionPrice=${price}&couponId=${couponId}&platform=${platform}&jumpPay=${'1'}&r=eiu12123`;
// window.location.href = `./login.html?redemptionPrice=${price}&couponId=${couponId}&platform=${platform}&jumpPay=${'1'}&r=efr12123`;
}, 2000)
}
}
});
})
}
</script>
</body>
......
......@@ -390,6 +390,19 @@
// window.location.href = 'https://activity.oytour.com/html/login.html';
// }
// }
let jumpPay = 0; //0 为跳转到活动页面 1位支付页面
let price = 0;
let couponId = 0;
let platform = 0;
let href = window.location.href;
if(href.split('?')[1] && href.split('?')[1].indexOf('redemptionPrice') != -1){
let param = href.split('?')[1].split("&") ? href.split('?')[1].split("&") : null;
price = param ? param[0].split('=')[1] : 0;
couponId = param ? param[1].split('=')[1] : 0;
platform = param ? param[2].split('=')[1] : 0;
jumpPay = param ? param[3].split('=')[1] : 1;
}
//跳转至激活
function goJihuo() {
$(".login_denglu").css({
......@@ -463,7 +476,15 @@
secretKey: res.data.secretKey,
}
localStorage.u = JSON.stringify(userInfo)
if(jumpPay == 0 || couponId == 0){
window.location.href = 'https://activity.oytour.com/html/GT_activities.html';
// window.location.href = './GT_activities.html';
}else {
window.location.href = `https://activity.oytour.com/html/Rushbuy.html?redemptionPrice=${price}&couponId=${couponId}&platform=${platform}&noClick=${'1'}&r=ejhr12123`;
// window.location.href = `./Rushbuy.html?redemptionPrice=${price}&couponId=${couponId}&platform=${platform}&noClick=${'1'}&r=efr12123`;
}
//window.location.href='http://127.0.0.1:5500/html/GT_activities.html';
} else {
layer.msg(res.message);
......
......@@ -289,8 +289,8 @@ $.fn.dataStatistics = function(options) {
// }
// localStorage.buyInfo = JSON.stringify(buyInfo)
window.location.href = `https://activity.oytour.com/html/Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}&r=efr12123`;
//window.location.href = `./Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}`;
window.location.href = `https://activity.oytour.com/html/Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}&noClick=${'0'}&r=efrq12123`;
// window.location.href = `./Rushbuy.html?redemptionPrice=${options.price}&couponId=${options.couponId}&platform=${options.platform}&noClick=${'0'}&r=efr12123`;
} else {
let data = {
'action': 'jump', // showToast->一个提示信息 showHud->一个黑色的loading
......
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