You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
3.1 KiB
HTML

<!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">
5 years ago
<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="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 href="{:U('PayH5/platform_weixin_pay',array('price' => $money,'user_token'=>I('user_token')))}" class="weui-grid js_grid">
<div class="weui-grid__icon">
<img src="__IMG__/wxpay.png" alt="">
</div>
<p class="weui-grid__label">
微信支付
</p>
</a>
5 years ago
<a id="alipaybtn" href="javascript:;" data-url="{:U('PayH5/platform_alipay_pay', array('price' => $money, 'user_token' => I('user_token')))}" class="weui-grid js_grid">
<div class="weui-grid__icon">
<img src="__IMG__/alipay.png" alt="">
</div>
<p class="weui-grid__label">
支付宝支付
</p>
</a>
5 years ago
</div>
</div>
</div>
</body>
<script src="__JS__/jquery.min.js"></script>
5 years ago
<script>
$(function(){
$('#alipaybtn').on('click',function() {
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) {
var data = result.data;
if(data.wap==1) {
location.href = data.url;
} else if (data.wap==1) {
window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
}
else {
if ($('#sdk_version').val() == 1)
window.mengchuang.getZFBPay(data.url);
else
window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
}
} else {
layer.open({
content: result.msg
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
}
}
});
}
});
</script>
</html>