|
@@ -1,9 +1,20 @@
|
|
|
|
+function newWin() {
|
|
|
|
+ var a = document.createElement("a");
|
|
|
|
+ a.setAttribute("target","_blank");
|
|
|
|
+ a.setAttribute("id", "newWin");
|
|
|
|
+ // 防止反复添加
|
|
|
|
+ if(!document.getElementById("newWin")) {
|
|
|
|
+ document.body.appendChild(a);
|
|
|
|
+ }
|
|
|
|
+}
|
|
jQuery(function($){
|
|
jQuery(function($){
|
|
|
|
+ newWin()
|
|
$('.vodal-close').click(function () {
|
|
$('.vodal-close').click(function () {
|
|
$('.cover').hide()
|
|
$('.cover').hide()
|
|
})
|
|
})
|
|
$(document).on('click','.coupon_link', function (e) {
|
|
$(document).on('click','.coupon_link', function (e) {
|
|
- e.preventDefault();
|
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
+ var flag = false;
|
|
var $coupon_id = $( this ).data( 'coupon-id' );
|
|
var $coupon_id = $( this ).data( 'coupon-id' );
|
|
var $ajax_action = $( this ).data('ajax-action');
|
|
var $ajax_action = $( this ).data('ajax-action');
|
|
var vodal=$(document).find('.vodal-dialog')
|
|
var vodal=$(document).find('.vodal-dialog')
|
|
@@ -27,9 +38,13 @@ jQuery(function($){
|
|
$vodal.find('.instruction-subtitle').html(data.code)
|
|
$vodal.find('.instruction-subtitle').html(data.code)
|
|
$('.cover').css('display', 'flex')
|
|
$('.cover').css('display', 'flex')
|
|
window.setTimeout(function () {
|
|
window.setTimeout(function () {
|
|
|
|
+ $("#newWin").attr("href",data.link);//当回调的时候更改页面上或创建的某个a标签的href
|
|
|
|
+ flag = true;//更改标志
|
|
|
|
+ $("#newWin")[0].click();
|
|
console.log(data.link);
|
|
console.log(data.link);
|
|
- window.location.assign(data.link);
|
|
|
|
- }, 6000);
|
|
|
|
|
|
+ // window.location.assign(data.link);
|
|
|
|
+ // tempwindow.location.href = data.link
|
|
|
|
+ }, 3000);
|
|
} else {
|
|
} else {
|
|
|
|
|
|
|
|
|
|
@@ -38,6 +53,8 @@ jQuery(function($){
|
|
}
|
|
}
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
} );
|
|
} );
|
|
|
|
|
|
} );
|
|
} );
|