ios 兼容旧包

master
tpingzhang 5 years ago
parent 2712671a50
commit 5548eddd12

@ -367,26 +367,26 @@ class AppleController extends BaseController{
*/
if (empty($request)) {
// $this->set_message(0, "fail", "登录数据不能为空");
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'登录数据不能为空')));exit;
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'登录数据不能为空')));exit;
}
// 支付验证 是否让支付
$payCheck = pay_check($user_id);
if (!$payCheck['code']) {
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=> $payCheck['msg'])));exit;
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=> $payCheck['msg'])));exit;
}
C(api('Config/lists'));
$game = M('Game','tab_')->where(['id'=>$request['game_id']])->field('pay_status')->find();
if($game['pay_status'] == 0){
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'该游戏暂时无法充值,请联系客服!')));exit;
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'该游戏暂时无法充值,请联系客服!')));exit;
}
if($request['price']*1<=0 || $request['price'] > C('WX_PAY_LIMIT')) {
// $this->set_message(0,"fail","充值金额有误");
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'充值金额有误')));exit;
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'充值金额有误')));exit;
}
$extend_data = M('spend','tab_')->where(array('extend'=>$request['extend'],'game_id'=>$request['game_id'],'pay_status'=>1))->find();
if($extend_data){
//$this->set_message(1089,"fail","订单号重复,请关闭支付页面重新支付");
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'订单号重复,请关闭支付页面重新支付')));exit;
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'订单号重复,请关闭支付页面重新支付')));exit;
}
$table = $request['code'] == 1 ? "spend" : "deposit";
$prefix = $request['code'] == 1 ? "SP_" : "PF_";
@ -416,7 +416,7 @@ class AppleController extends BaseController{
$json_data['url'] = $is_pay['mweb_url'].'&redirect_url='.(is_ssl()?'https%3A%2F%2F':'http%3A%2F%2F'). $_SERVER ['HTTP_HOST'] . "%2Fsdk.php%2FSpend%2Fpay_success%2Forderno%2F".$request['pay_order_number'].'%2Fgame_id%2F'.$request['game_id'] ;
}else{
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'支付失败')));exit;
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'支付失败')));exit;
}
}elseif(get_wx_pay_type() == 1){
$request['pay_way'] = 4; // 威富通wx
@ -458,12 +458,12 @@ class AppleController extends BaseController{
}elseif(get_wx_pay_type() == 3){
if( empty(C('goldpig.partner'))||empty(C('goldpig.wooolid'))){
// $this->set_message(1009, "fail", "支付参数未配置");
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'支付参数未配置')));exit;
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'支付参数未配置')));exit;
}
$request['pay_way'] = 8;
if($pay_amount*1<1){
redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'单笔充值金额必须大于1元')));exit;
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'单笔充值金额必须大于1元')));exit;
}
if($request['code']==1){

@ -280,6 +280,10 @@ class SpendController extends Controller {
$this->display ();
}
public function notice_v1($user_id = 0, $game_id = 0, $msg = '') {
$this->display ();
}
/*
* ALTER TABLE `tab_deposit`
ADD COLUMN `pay_url` varchar(255) NOT NULL DEFAULT '' AFTER `check_sign`;

@ -0,0 +1,82 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<link href="__CSS__/index.css" rel="stylesheet" />
<style>
html{font-size:12px;}
body {background:#F3F2F7;font-size:inherit;}
i{font-style:normal;font-weight:normal;}
.table {display:table;width:100%;height:100%;text-align:center;}
.table_cell {display:table-cell;vertical-align:middle;}
.notice {margin: 0 auto;
padding: 0;
font-size: 1.2rem;
background: rgba(25,177,234);
color: #fff;
line-height: 3.2rem;
width: 80%;
border-radius: 0.7rem;}
.back {margin-top: 1rem;}
@media screen and (max-width:400px) {
.recharge_game {border-top-width:1px;}
}
</style>
<script src="__JS__/jquery-1.11.1.min.js"></script>
</head>
<body>
<div class="containers">
<div class="table">
<div class="table_cell">
<p class="notice">
{:I('msg')}
</p>
<div class="back" id="back"><i>3</i>秒后<a id="url" href="{:U('Spend/pay_way',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}">返回</a></a>
</div>
</div>
</div>
</body>
<script>
var html=document.getElementsByTagName('html')[0];
function fontsizechange() {
var rate = html.clientWidth/640;
var basesize = 22;
html.style.fontSize = (rate>1?basesize:basesize*rate)+'px';
}
fontsizechange();
window.onresize = function() {
fontsizechange();
};
(function(){
var back = document.getElementById('back');
var url = document.getElementById('url')
var i = back.getElementsByTagName('i')[0];
var t = 3;
var b = setInterval(function(){
t--;
i.innerHTML = t;
t<=0 && (clearInterval(b),window.location.href=url);
},1000);
})();
</script>
</html>
Loading…
Cancel
Save