|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
|
<link rel="stylesheet" href="__CSS__/weui.min.css">
|
|
|
|
<link rel="stylesheet" href="__CSS__/sdkptbpay.css">
|
|
|
|
<script src="__JS__/resize.js" type=""></script>
|
|
|
|
<title>支付</title>
|
|
|
|
</head>
|
|
|
|
<body class="pay-box">
|
|
|
|
<!-- <div class="ptbnav" style="background:url('__IMG__/navbg.png') no-repeat bottom center/100% 100%;">
|
|
|
|
<img src="__IMG__/back.png">
|
|
|
|
<p>支付</p>
|
|
|
|
<div></div>
|
|
|
|
</div> -->
|
|
|
|
<div class="js_dialog" id="msgdialog" style="display: none">
|
|
|
|
<div class="weui-mask"></div>
|
|
|
|
<div class="weui-dialog" style="width: 4.5rem;max-width: 4.5rrem;display: flex;flex-direction:column;padding-bottom: .3rem;">
|
|
|
|
<div id="close_tip" style="width: 100%;text-align: left;height: .6rem;display: flex;">
|
|
|
|
<img src="__IMG__/close-black.png" style="width: .3rem;height: .3rem;margin: .3rem 0 0 .3rem;">
|
|
|
|
</div>
|
|
|
|
<div style="width: 100%;text-align: center;">
|
|
|
|
<img src="__IMG__/txicon.png" style="width: 2.44rem;height: 1.46rem;">
|
|
|
|
</div>
|
|
|
|
<p id="tipmsg" style="text-align: center;font-size: .24rem;margin: .35rem auto;">
|
|
|
|
提示内容提示内容
|
|
|
|
</p>
|
|
|
|
<div style="width: 100%;text-align: center;display: flex;justify-content:center;">
|
|
|
|
<div id="tipok" style="width: 3.3rem;height: .6rem;background-color: #21B1EB;color: #ffffff;font-size: .28rem;border-radius:30px;line-height: .6rem;">
|
|
|
|
确认
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ptbboxpad">
|
|
|
|
<div class="ptbbox">
|
|
|
|
<div class="weui-cell payuser">
|
|
|
|
<div class="weui-cell__bd">
|
|
|
|
<p>充值账号</p>
|
|
|
|
</div>
|
|
|
|
<div class="weui-cell__ft">{$account}</div>
|
|
|
|
</div>
|
|
|
|
<div class="weui-cell payinfo">
|
|
|
|
<div class="weui-cell__bd">
|
|
|
|
<p>充值金额</p>
|
|
|
|
</div>
|
|
|
|
<div class="weui-cell__ft">¥{$money}.00</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ptbboxpad" style="padding-top:0;">
|
|
|
|
<div class="ptbbox">
|
|
|
|
<div class="weui-grids bordergirid">
|
|
|
|
<a id="wxpay" data-url="{:U('PayH5/platform_weixin_pay',array('price' => $money,'user_token'=>I('user_token'),'api_ver' => $api_ver, 'game_id' => $game_id))}" class="weui-grid js_grid">
|
|
|
|
<div class="weui-grid__icon">
|
|
|
|
<img src="__IMG__/wxpay.png" alt="">
|
|
|
|
</div>
|
|
|
|
<p class="weui-grid__label">
|
|
|
|
微信支付
|
|
|
|
</p>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a id="alipaybtn" href="javascript:;" data-url="{:U('PayH5/platform_alipay_pay', array('price' => $money, 'user_token' => I('user_token'), 'game_id' => $game_id))}" class="weui-grid js_grid">
|
|
|
|
<div class="weui-grid__icon">
|
|
|
|
<img src="__IMG__/alipay.png" alt="">
|
|
|
|
</div>
|
|
|
|
<p class="weui-grid__label">
|
|
|
|
支付宝支付
|
|
|
|
</p>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a id="shorcut" href="javascript:;" data-url="{:U('WapPay/wap_shortcut_pay', array('user_id'=>I('user_id'),'game_id'=>I('game_id'),'user_token'=>I('user_token'),'code'=>0,'type'=>'platform'))}" class="weui-grid js_grid">
|
|
|
|
<div class="weui-grid__icon">
|
|
|
|
<img src="__IMG__/onlinepay.png" alt="">
|
|
|
|
</div>
|
|
|
|
<p class="weui-grid__label">
|
|
|
|
快捷支付
|
|
|
|
</p>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
<script src="__JS__/jquery.min.js"></script>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$(function(){
|
|
|
|
var flag = false;
|
|
|
|
$("#shorcut").on('click', function() {
|
|
|
|
if (flag) return ;
|
|
|
|
flag = true;
|
|
|
|
var url = $(this).data('url');
|
|
|
|
window.location.href = url;
|
|
|
|
});
|
|
|
|
|
|
|
|
$("#close_tip,#tipok").click(function(){
|
|
|
|
$("#msgdialog").hide();
|
|
|
|
flag = false;
|
|
|
|
})
|
|
|
|
$("#wxpay").on('click', function() {
|
|
|
|
if (flag) return ;
|
|
|
|
flag = true;
|
|
|
|
$.ajax({
|
|
|
|
type: "GET",
|
|
|
|
dataType: "json",
|
|
|
|
url: $(this).data('url'),
|
|
|
|
data: {
|
|
|
|
|
|
|
|
},
|
|
|
|
success: function(r) {
|
|
|
|
if (r.status == 1) {
|
|
|
|
window.location.href = r.data;
|
|
|
|
} else {
|
|
|
|
$("#tipmsg").html(r.msg);
|
|
|
|
$("#msgdialog").show();
|
|
|
|
// alert(r.msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
//window.location.href = $(this).data('url');
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#alipaybtn').on('click',function() {
|
|
|
|
if (flag) return ;
|
|
|
|
flag = true;
|
|
|
|
|
|
|
|
var that = $(this),url = $.trim(that.attr('data-url'));
|
|
|
|
if(that.hasClass('disabledbtn')){return false;}
|
|
|
|
that.addClass('disabled');
|
|
|
|
$.ajax({
|
|
|
|
type:'post',
|
|
|
|
dataType:'json',
|
|
|
|
data:{},
|
|
|
|
url:url,
|
|
|
|
success:function(result) {
|
|
|
|
if(result.code==200) {
|
|
|
|
window.location.href = result.url;
|
|
|
|
return ;
|
|
|
|
var data = result.data;
|
|
|
|
if(data.wap==1) {
|
|
|
|
/* if () {
|
|
|
|
window.txyxsdk.sqzfbcallback();
|
|
|
|
} */
|
|
|
|
location.href = data.url;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
var u = navigator.userAgent;
|
|
|
|
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
|
|
if (isAndroid) {
|
|
|
|
window.txyxsdk.getZFBPay(data.url);
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
|
|
|
|
} catch(err) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$("#tipmsg").html(result.msg);
|
|
|
|
$("#msgdialog").show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</html>
|