From 0a629876654cc57a0d84c706c42d363589c0ef97 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Thu, 17 Oct 2019 20:12:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B6=85=E7=BA=A7=E7=AD=BE?= =?UTF-8?q?=E5=90=8DBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/Ipa365Controller.class.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Application/Sdk/Controller/Ipa365Controller.class.php b/Application/Sdk/Controller/Ipa365Controller.class.php index 0996bacfe..77813802a 100644 --- a/Application/Sdk/Controller/Ipa365Controller.class.php +++ b/Application/Sdk/Controller/Ipa365Controller.class.php @@ -115,20 +115,27 @@ class Ipa365Controller extends BaseController{ if (!$userId || !$gameId) { $this->error("参数有误!"); } - + $payLog = M('game_supersign', 'tab_')->where(array( 'user_id' => $userId, - 'game_id' => $gameId, - 'pay_status' => 0 + 'game_id' => $gameId ))->find(); $gameInfo = M('game', 'tab_')->field('game_name,supersign_token')->where(array( 'id' => $gameId, ))->find(); - if ($payLog) { + if ($payLog && $payLog['pay_status']==0) { $orderId = $payLog['order_id']; - } else { + }elseif ($payLog && $payLog['pay_status']==1){ + $orderId = $payLog['order_id']; + if(stripos($_SERVER['HTTP_HOST'], '.wmtxkj.cn') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){ + redirect("http://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId"); + }else{ + redirect("https://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/$userId/game_id/$gameId/order_id/$orderId"); + } + $this->error("亲~您已购买过了~请到【订单查询】查看订单信息哟~"); + } else { $orderId = "SS_" . date('Ymd') . date('His') . sp_random_string(4); // 超级签 if (!$gameInfo['supersign_token']) { $this->error("超级签token未填写!");