From 3837dd1e54e9d50924db97fdb572fd8b0572d7b4 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Tue, 12 Nov 2019 18:17:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?ios=20=E5=85=BC=E5=AE=B9=E6=97=A7=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/View/default/Spend/pay_way_v1.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Application/Sdk/View/default/Spend/pay_way_v1.html b/Application/Sdk/View/default/Spend/pay_way_v1.html index eea05953..9d4a1236 100644 --- a/Application/Sdk/View/default/Spend/pay_way_v1.html +++ b/Application/Sdk/View/default/Spend/pay_way_v1.html @@ -78,7 +78,7 @@
- +
@@ -180,6 +180,13 @@ } $(function() { + var flag = false; + $("#wxpay").on('click', function() { + if (flag) return ; + flag = true; + window.location.href = $(this).data('url'); + }); + $(".recharge_way_wrap a").one("click",function(){ $(this).click(function (){return false;}); }); @@ -203,6 +210,8 @@ }); $('#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'); From 9b0cef356b056bc9de620d00b22f25164dc423ea Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Tue, 12 Nov 2019 18:18:25 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=82=AC=E6=B5=AE=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameGiftPageController.class.php | 14 +++++++++++ .../Sdk/Controller/PageBaseController.php | 24 +++++++++++++++++++ .../Sdk/Controller/UserHController.class.php | 18 ++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 Application/Sdk/Controller/PageBaseController.php diff --git a/Application/Sdk/Controller/GameGiftPageController.class.php b/Application/Sdk/Controller/GameGiftPageController.class.php index 5ead8518..c7a5d684 100644 --- a/Application/Sdk/Controller/GameGiftPageController.class.php +++ b/Application/Sdk/Controller/GameGiftPageController.class.php @@ -4,6 +4,20 @@ use Think\Controller; use Common\Api\GaemApi; class GameGiftPageController extends Controller{ + public $userId; + public function _initialize() + { + $userToken = I("request.user_token"); + if (!$userToken) { + re_msg(11, "参数有误,请重新登入获取!"); + } + + $this->userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id"); + $this->userToken = $userToken; + if (!$this->userId) { + re_msg(12, $userToken."Token失效"); + } + } public function gift_list(){ $gameId = I('game_id'); $sdkVersion = I('sdk_version', -1); diff --git a/Application/Sdk/Controller/PageBaseController.php b/Application/Sdk/Controller/PageBaseController.php new file mode 100644 index 00000000..21d2e4fd --- /dev/null +++ b/Application/Sdk/Controller/PageBaseController.php @@ -0,0 +1,24 @@ +userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id"); + $this->userToken = $userToken; + if (!$this->userId) { + re_msg(12, $userToken."Token失效"); + } + } +} diff --git a/Application/Sdk/Controller/UserHController.class.php b/Application/Sdk/Controller/UserHController.class.php index 0b7d004f..f252fab8 100644 --- a/Application/Sdk/Controller/UserHController.class.php +++ b/Application/Sdk/Controller/UserHController.class.php @@ -7,6 +7,24 @@ use Think\Log; class UserHController extends Controller { + + + public $userId; + public function _initialize() + { + $userToken = I("request.user_token"); + if (!$userToken) { + re_msg(11, "参数有误,请重新登入获取!"); + } + + $this->userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id"); + $this->userToken = $userToken; + if (!$this->userId) { + re_msg(12, $userToken."Token失效"); + } + } + + /** * 获取用户平台币充值记录绑币余额 * @return [type] [description] From 1069477b80b70e266d908c299aa6bc9da415337e Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Tue, 12 Nov 2019 19:44:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?ios=20=E5=85=BC=E5=AE=B9=E6=97=A7=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/View/default/Spend/pay_way_v1.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Application/Sdk/View/default/Spend/pay_way_v1.html b/Application/Sdk/View/default/Spend/pay_way_v1.html index 9d4a1236..098a6b2e 100644 --- a/Application/Sdk/View/default/Spend/pay_way_v1.html +++ b/Application/Sdk/View/default/Spend/pay_way_v1.html @@ -92,12 +92,13 @@ -->
- + +
@@ -110,13 +111,13 @@
- + From 6de5ed4da2fa27710c4e8f620973f42f48e1de41 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Tue, 12 Nov 2019 20:16:01 +0800 Subject: [PATCH 4/4] =?UTF-8?q?ios=20=E5=85=BC=E5=AE=B9=E6=97=A7=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/BaseController.class.php | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/Application/Sdk/Controller/BaseController.class.php b/Application/Sdk/Controller/BaseController.class.php index 81b57f1d..d89b100c 100644 --- a/Application/Sdk/Controller/BaseController.class.php +++ b/Application/Sdk/Controller/BaseController.class.php @@ -34,7 +34,6 @@ class BaseController extends RestController{ $a = ACTION_NAME; $data = json_decode ( base64_decode ( file_get_contents ( "php://input" ) ), true ); - if (isset($data['api_ver']) && $data['api_ver'] == 2) { if (!(in_array($c, $this->noNeedGame) || in_array($a, $this->noNeedGame) || in_array($c.".".$a, $this->noNeedGame))) { // 解决在游戏中未退出的用户 user_token 不存在问题 $userToken = M('user', 'tab_')->where(['id' => $data['user_id']])->getField('user_token'); @@ -96,56 +95,6 @@ class BaseController extends RestController{ } } - } else { // 旧版 - - - C(api('Config/lists')); - - if( - !preg_match("/apple_alipay_pay/",GetCurUrl()) - &&!preg_match("/apple_weixin_pay/",GetCurUrl()) - &&!preg_match("/get_alipay_zmxy_return/",GetCurUrl()) - &&!preg_match("/apple_platform_pay/",GetCurUrl()) - &&!preg_match("/notice/",GetCurUrl()) - &&!preg_match("/apple_union_pay/",GetCurUrl()) - &&!preg_match("/test/",GetCurUrl()) - &&!preg_match("/wap_shortcut_pay/",GetCurUrl()) - &&!preg_match("/shortcut_pay/",GetCurUrl()) - &&!preg_match("/android_shortcut_pay/",GetCurUrl()) - &&!preg_match("/wap_shortcut_pay/",GetCurUrl()) - &&!preg_match("/apple_weixin_pay/",GetCurUrl()) - &&!preg_match("/Ipa365/",GetCurUrl()) - &&!preg_match("/user_login/",GetCurUrl()) - &&!preg_match("/platform_coin_deduction/",GetCurUrl()) - ){ - $data = json_decode(base64_decode(file_get_contents("php://input")),true); - - // #判断数据是否为空 - if(empty($data) || empty($data['game_id'])){ - echo base64_encode(json_encode(array("status"=>10,"return_msg"=>"操作数据或游戏ID不能为空")));exit(); - } - $md5Sign = $data['md5_sign']; - unset($data['md5_sign']); - - #获取游戏key - $game_data = M("game","tab_")->alias("g")->field("s.*") - ->where(['g.apply_status'=>1,'g.id'=>$data['game_id']]) - ->join("left join tab_game_set s on s.game_id = g.id") - ->find(); - if(empty($game_data)){ - $this->set_message(0,"fail","游戏不存在或未通过审核"); - } - - if (isset($data['openid'])) // 小程序支付增加参数 - unset($data['openid']); - $md5_sign = $this->encrypt_md5($data,$game_data["access_key"]);//mengchuang DZQkkiz!@#9527 - if($md5Sign !== $md5_sign){ - $this->set_message(0,"fail","验签失败"); - } - - } - - } }