平台币弹窗提示提交

master
zhengyongxing 5 years ago
parent ccd5970521
commit b5fab80b3b

@ -18,7 +18,7 @@
支付中心 支付中心
</div> </div>
</div> --> </div> -->
<div class="payment_model" style="position: fixed;width: 100%;height: 100%;top: 0;left: 0;background:rgba(38,38,38,0.4);z-index: 0;display: none"></div>
<div class="payment_window" style="display: none"> <div class="payment_window" style="display: none">
<div class="payment_window_img"> <div class="payment_window_img">
<img src="__IMG__/payment_window.png" alt=""> <img src="__IMG__/payment_window.png" alt="">
@ -124,7 +124,7 @@
支付中心 支付中心
</div> </div>
</div> --> </div> -->
<div class="payment_model" style="position: fixed;width: 100%;height: 100%;top: 0;left: 0;background:rgba(38,38,38,0.4);z-index: 0;display: none"></div>
<div class="payment_window" style="display: none"> <div class="payment_window" style="display: none">
<div class="payment_window_img"> <div class="payment_window_img">
<img src="__IMG__/payment_window.png" alt=""> <img src="__IMG__/payment_window.png" alt="">
@ -265,17 +265,23 @@
defaultInit(); defaultInit();
function closeWindow() { function closeWindow() {
$(".payment_window").hide();
$(".payment_model").hide();
}
function showWindow(msg) {
$(".payment_window").show();
$(".payment_model").show();
$(".payment_window_img").children().next().text(msg);
} }
$(".payment_window_close").click(function() { $(".payment_window_close").click(function() {
$(".payment_window").hide(); closeWindow();
}); });
$(".payment_window_confirm").click(function() { $(".payment_window_confirm").click(function() {
$(".payment_window").hide(); closeWindow();
}); });
$(".select_pay_info").click(function(){ $(".select_pay_info").click(function(){
@ -289,6 +295,8 @@
$(this).siblings(".payment_rest_way").children("img").attr("src","__IMG__/pay_way/dagou1.png"); $(this).siblings(".payment_rest_way").children("img").attr("src","__IMG__/pay_way/dagou1.png");
var img=$(this).children("div").children("img").attr("src"); var img=$(this).children("div").children("img").attr("src");
var text = $(this).children("div").children("span").text(); var text = $(this).children("div").children("span").text();
//获取支付参数
if (payway == $(this).data("type")) return ;
//获取支付参数 //获取支付参数
payway = $(this).data("type"); payway = $(this).data("type");
payurl = $(this).data("url"); payurl = $(this).data("url");
@ -333,10 +341,13 @@
flag = false; flag = false;
if (r.code == 200) { if (r.code == 200) {
window.location.href = r.url; window.location.href = r.url;
} else if(r.code == 1001) {
showWindow(r.msg);
} else { } else {
$(".tipmsg").html(result.msg); $(".tipmsg").html(r.msg);
$(".msgdialog").show(); $(".msgdialog").show();
} }
} }
}); });
@ -373,9 +384,11 @@
} }
} }
} }
} else { } else if(result.code == 1001) {
showWindow(result.msg);
}else {
$(".tipmsg").html(result.msg); $(".tipmsg").html(result.msg);
$(".msgdialog").show(); $(".msgdialog").show();
} }
} }
}); });
@ -393,9 +406,11 @@
flag = false; flag = false;
if (r.code == 200) { if (r.code == 200) {
window.location.href = r.url; window.location.href = r.url;
} else if(r.code == 1001) {
showWindow(r.msg);
} else { } else {
$(".tipmsg").html(result.msg); $(".tipmsg").html(r.msg);
$(".msgdialog").show(); $(".msgdialog").show();
} }
} }
@ -407,8 +422,37 @@
//快捷支付 //快捷支付
function sqshorcut(){ function sqshorcut(){
var url = payurl;
flag = false; flag = false;
window.location.href =payurl; $.ajax({
type:'post',
dataType:'json',
data:{sign: 1},
url:url,
success:function(result) {
if(result.code==200) {
window.location.href = url;
} else if(result.code==1001){
flag=false;
showWindow(result.msg);
} else {
flag=false;
$(".tipmsg").html(result.msg);
$(".msgdialog").show();
}
},
error:function(){
flag=false;
$(".tipmsg").html("接口请求错误");
$(".msgdialog").show();
}
});
return false;
// flag = false;
// window.location.href =payurl;
} }
$(".payment_rest_btn").click(function(){ $(".payment_rest_btn").click(function(){
$(".payment_rest_btn").hide(); $(".payment_rest_btn").hide();

Loading…
Cancel
Save