From f8f9986d317af68c4953407cc49e33260be8f144 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Wed, 13 Nov 2019 19:37:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=B8=81=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=94=AF=E4=BB=98=20=20ajax=20=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/BaseController.class.php | 2 ++ Application/Sdk/Controller/PayH5Controller.class.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Application/Sdk/Controller/BaseController.class.php b/Application/Sdk/Controller/BaseController.class.php index 7b28a0cf..bffe1d66 100644 --- a/Application/Sdk/Controller/BaseController.class.php +++ b/Application/Sdk/Controller/BaseController.class.php @@ -151,6 +151,8 @@ class BaseController extends RestController{ echo base64_encode(json_encode($msg,JSON_FORCE_OBJECT)); }elseif($type == 2){ echo base64_encode(json_encode($msg,true)); + }elseif($type == 3) { + echo json_encode($msg); }else{ echo base64_encode(json_encode($msg)); } diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index 9673d4c8..ce09bfcb 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -604,7 +604,7 @@ ADD COLUMN `pay_url` text NULL AFTER `check_sign`; $game_id = I('request.game_id'); $user_id = $request['user_id']; if($request['price']*1<=0 || $request['price'] > C('WX_PAY_LIMIT')) { - $this->new_set_message(0,"fail","充值金额有误"); + $this->new_set_message(0,"fail","充值金额有误", 3); //redirect(U('Spend/notice',array('user_id'=>$user_id, 'is_platform' => 1, 'msg'=>'充值金额有误', 'game_id' => $game_id, 'user_token' => $this->userToken)));exit; } @@ -631,7 +631,7 @@ ADD COLUMN `pay_url` text NULL AFTER `check_sign`; redirect($json_data['url']); } */ }else{ - $this->new_set_message(0,"fail","支付失败"); + $this->new_set_message(0,"fail","支付失败", 3); // redirect(U('Spend/notice',array('user_id'=>$user_id, 'is_platform' => 1,'game_id'=>$game_id,'msg'=>'支付失败', 'user_token' => $this->userToken)));exit; } }elseif(get_wx_pay_type() == 1){