<!DOCTYPE html>
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" >
< meta http-equiv = "X-UA-Compatible" content = "chrome=1,IE=edge" >
< meta name = "apple-mobile-web-app-capable" content = "yes" >
< meta name = "mobile-web-app-capable" content = "yes" >
< meta name = "viewport" content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" >
< meta name = "format-detection" content = "telephone=no" >
< link rel = "stylesheet" href = "__CSS__/weui.min.css" >
< script src = "__JS__/flex.min.js" > < / script >
< script src = "__JS__/jquery-1.11.1.min.js" > < / script >
< title > 支付中心< / title >
< / head >
< style >
html,
body {
background-color: #F5F5F5;
min-height: 100vh;
}
.weui-cells {
border-radius: .2rem;
box-shadow: 0px 0px .05rem rgba(0, 0, 0, .2);
margin-top: 0px;
}
.weui-cell {
height: 0.85rem;
font-size: .28rem;
color: #292929;
padding: 0px .3rem;
}
img {
width: .72rem;
height: .72rem;
margin-right: .2rem;
/* margin: .3rem; */
}
.paylist .weui-cell {
padding: .2rem .3rem;
height: 1rem;
}
.paylist .weui-cell__hd {
display: flex;
}
.weui-cells:after {
border: 0px;
}
.weui-cells:before {
border: 0px;
}
@media screen and (orientation: portrait) {
.box{
padding:.3rem;
}
.bottombutton{
height:1rem;background-color: #21B1EB;color: #ffffff;font-size: .32rem;text-align: center;line-height:1rem;bottom: 0px;
position: fixed;left: 0;right: 0;
}
}
@media screen and (orientation: landscape) {
/*横屏 css*/
.box{
padding:.3rem .5rem;
}
.bottombutton{
height:1rem;background-color: #21B1EB;color: #ffffff;font-size: .32rem;text-align: center;line-height:1rem;
width: 7.5rem;border-radius: .2rem;position: absolute;left: 50%;margin: .5rem 0 .5rem -3.75rem;
}
body{
padding-bottom: .50rem;
}
.paylist-box{
display: flex;
height: auto;
flex-wrap:wrap;
}
.paylist-box .weui-cell{
min-width: 30%;
box-sizing: content-box;
margin-left: 3%;
padding: .2rem .0rem;
/* padding: .4rem .3rem; */
}
.paylist-box .weui-cell:before{
content: none;
}
}
.border-half-line{
width: 97%;
margin-left: 3%;
float:left;
height:1px;
background-color: #e5e5e5;
-webkit-transform:scale(1,0.5);
transform:scale(1,0.5);
-webkit-transform-origin:top center;
transform-origin: top center
}
@media screen and (orientation: portrait) {
.box{
padding:.3rem;
}
}
@media screen and (orientation: landscape) {
/*横屏 css*/
.box{
padding:.3rem .5rem;
}
.bottombutton{
height:1rem;background-color: #21B1EB;color: #ffffff;font-size: .32rem;text-align: center;line-height:1rem;
width: 7.5rem;border-radius: .2rem;position: absolute;left: 50%;margin: .5rem 0 .5rem -3.75rem;
}
body{
padding-bottom: .50rem;
}
}
< / style >
< body >
< div class = "box" >
< div class = "weui-cells" >
< div class = "weui-cell" >
< div class = "weui-cell__bd" >
< p > 订单金额:< / p >
< / div >
< div class = "weui-cell__ft" style = "color: red" > ¥{$data['price']}元< / div >
< / div >
< div class = "weui-cell" >
< div class = "weui-cell__bd" >
< p > 您的账户余额:< / p >
< / div >
< div class = "weui-cell__ft" style = "color: #A9A9A9;" > {$balance+$bind_balance}平台币< / div >
< / div >
< / div >
< div class = "weui-cells" style = "margin-top: .3rem;" >
< div class = "weui-cell" >
< div class = "weui-cell__bd" >
< p > 适用平台余额:< / p >
< / div >
< div class = "weui-cell__ft" style = "color: #292929" > -¥{$balance+$bind_balance}< / div >
< / div >
< div class = "weui-cell" >
< div class = "weui-cell__bd" >
< p > 还需支付:< / p >
< / div >
< div data-pay_price = "{$pay_price}" id = "pay_price" class = "weui-cell__ft" style = "color: red" > ¥{$pay_price}< / div >
< / div >
< / div >
< div class = "weui-cells paylist" style = "margin-top: .3rem;" >
< div class = "weui-cells__title" style = "line-height: .85rem;color: #a9a9a9;font-size:.28rem;margin: 0px;" >
请选择支付方式< / div >
< div class = "border-half-line" style = "position: absolute;" > < / div >
< div class = "paylist-box" >
< if condition = "C('alipay.status') eq 1 or (C('goldpig.status') eq 1 and C('goldpig.zfb') eq 1) or (C('sqpay.status') eq 1 and C('sqpay.zfb') eq 1)" >
< a id = "alipaybtn" class = "weui-cell" href = "javascript:;" data-url = "/sdk.php?s=/Apple/apple_alipay_pay&user_id={:I('user_id')}&game_id={:I('game_id')}" id = "alipaybtn" class = "recharge_way_btn recharge_way_btn_alipay" >
< div class = "weui-cell__hd" > < img src = "__IMG__/alipay.png" > < / div >
< div class = "weui-cell__bd" >
< p style = "color: #292929;font-size:.28rem;" > 支付宝支付< / p >
< p style = "color: #a9a9a9;font-size:.2rem;" > 推荐支付宝用户使用< / p >
< / div >
< / a >
< / if >
< if condition = "$pay_price elt C('WX_PAY_LIMIT')" >
< if condition = "C('wei_xin.status') eq 1 or C('weixin_gf.status') eq 1 or (C('goldpig.status') eq 1 and C('goldpig.wx') eq 1) or (C('heepay.status') eq 1 and C('heepay.wxp') eq 1)" >
< a class = "weui-cell" href = "{:U('Apple/apple_weixin_pay',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class = "recharge_way_btn recharge_way_btn_wechat" >
< div class = "weui-cell__hd" > < img src = "__IMG__/wxpay.png" > < / div >
< div class = "weui-cell__bd" >
< p style = "color: #292929;font-size:.28rem;" > 微信支付< / p >
< p style = "color: #a9a9a9;font-size:.2rem;" > 推荐微信用户使用< / p >
< / div >
< / a >
< / if >
< / if >
< if condition = "C('sqpay.status') eq 1 and C('sqpay.union') eq 1" >
< a class = "weui-cell" href = "{:U('Apple/apple_union_pay', array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class = "recharge_way_btn recharge_way_btn_alipay" >
< div class = "weui-cell__hd" > < img src = "__IMG__/cardpay.png" > < / div >
< div class = "weui-cell__bd" >
< p style = "color: #292929;font-size:.28rem;" > 银行卡支付< / p >
< p style = "color: #a9a9a9;font-size:.2rem;" > 使用银行卡支付< / p >
< / div >
< / a >
< / if >
< if condition = "C('sqpay.status') eq 1 and C('sqpay.shortcut') eq 1" >
< a class = "weui-cell" href = "{:U('WapPay/wap_shortcut_pay', array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class = "recharge_way_btn recharge_way_btn_alipay" >
< div class = "weui-cell__hd" > < img src = "__IMG__/onlinepay.png" > < / div >
< div class = "weui-cell__bd" >
< p style = "color: #292929;font-size:.28rem;" > 快捷支付< / p >
< p style = "color: #a9a9a9;font-size:.2rem;" > 可在线快捷支付< / p >
< / div >
< / a >
< / if >
< / div >
< / div >
< / div >
< botton id = "platform_pay" class = "bottombutton" >
确认支付
< / botton >
< / body >
< script >
$(function() {
if ($("#pay_price").data("pay_price") == 0) {
$("#platform_pay").show();
$(".paylist").hide();
} else {
$("#platform_pay").hide();
$(".paylist").show();
}
$("#platform_pay").click(function() {
var url = "{:U('Apple/platform_coin_deduction',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}";
window.location.href = url;
});
$('#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 {
window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
}
} else {
layer.open({
content: result.msg
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
}
},error:function() {
that.removeClass('disabledbtn');
}
});
return false;
});
});
< / script >
< / html >