From d90652797035966245a557aa3fd3566561c58821 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 30 Sep 2019 16:58:04 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=88=86=E5=8C=85?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/AutoPackController.class.php | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index 9da29ddaf..69c4a53c4 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -37,7 +37,6 @@ class AutoPackController extends Think public function package() { - $find_web_stie = M('config') -> field('value') -> where(['name' => 'WEB_SITE']) @@ -49,18 +48,10 @@ class AutoPackController extends Think } $this->checkPackageStatus(); - $this->app_package();//app渠道自动打包 - $this->channel(); - $this->launch_package(false); - $this->leak_detection(); - - - - } /** @@ -209,7 +200,7 @@ class AutoPackController extends Think $to = "./Uploads/" . $file_name . "/" . $new_name; copy($url, ROOTTT . ltrim($to, './')); $zip_res = $zip -> open(ROOTTT . ltrim($to, './'), \ZipArchive::CREATE); - + if($zip_res == true) { #打包数据 $pack_data = array( @@ -311,7 +302,6 @@ class AutoPackController extends Think * @throws \think\exception\DbException */ private function channel() { - $zip = new \ZipArchive(); $map['status'] = 1; @@ -346,13 +336,11 @@ class AutoPackController extends Think $launchCount = $launchModel->where(['apply_id'=>$value['id']])->count(); if($launchCount>0) { - $applyModel->where(['id' => $value['id']]) -> setField('enable_status', 3); $launchModel->where(['apply_id'=>$value['id'], 'launch_packge'=>['in',[0,2,3]]])->save(['launch_packge'=>2,'launch_down_url'=>'','launch_plist_url'=>'']); } else { - $applyModel -> where(['id' => $value['id']]) -> setField('enable_status', 3); if ($value['sdk_version'] == 1) { @@ -377,6 +365,7 @@ class AutoPackController extends Think } $new_name = "game_package" . $value['game_id'] . "-" . $value['promote_id'] . $str_ver; $to = "./Uploads/" . $file_name . "/" . $new_name; + $localPath = ROOTTT . ltrim($to, './'); copy(get_game_source_file_url($value['game_id']), ROOTTT . ltrim($to, './')); $zip_res = $zip -> open(ROOTTT . ltrim($to, './'), \ZipArchive::CREATE); if ($zip_res == true) { @@ -408,9 +397,14 @@ class AutoPackController extends Think $new_to = ROOTTT . "Uploads/" . $file_name . "/" . $newname; $updata['savename'] = $newname; $updata['path'] = $new_to; - $this -> upload_game_pak_oss($updata); + $result = $this -> upload_game_pak_oss($updata); @unlink($new_to); + if ($result) { + if (file_exists($localPath)) { + unlink($localPath); + } + } } elseif (get_tool_status("qiniu_storage") == 1) { $this -> dleteQiNiuFile($newname); From 57f1929bf9d8e039f0020bc0adb7410fb9ee5cab Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Mon, 30 Sep 2019 17:00:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=AE=9Dwap=20=E6=94=AF=E4=BB=98=E8=BF=94=E5=9B=9E=20bug?= =?UTF-8?q?=E3=80=82android=20=20ios=20=E9=83=BD=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/SpendController.class.php | 3 +++ .../Sdk/View/default/Spend/pay_error.html | 20 ++++++++++++++++--- .../Library/Think/Pay/Driver/Alipay.class.php | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Application/Sdk/Controller/SpendController.class.php b/Application/Sdk/Controller/SpendController.class.php index 45e606255..3ab04ae10 100644 --- a/Application/Sdk/Controller/SpendController.class.php +++ b/Application/Sdk/Controller/SpendController.class.php @@ -146,6 +146,9 @@ class SpendController extends Controller { $this->display ( 'pay_success' ); } public function pay_error() { + $Scheme = file_get_contents ( "./Application/Sdk/Scheme/" . $_GET ['game_id'] . ".txt" ); + + $this->assign ('Scheme', $Scheme?$Scheme:'txplatformsdk'); $this->display (); } public function notice($user_id = 0, $game_id = 0, $msg = '') { diff --git a/Application/Sdk/View/default/Spend/pay_error.html b/Application/Sdk/View/default/Spend/pay_error.html index e044ca8a7..380872648 100644 --- a/Application/Sdk/View/default/Spend/pay_error.html +++ b/Application/Sdk/View/default/Spend/pay_error.html @@ -41,6 +41,7 @@ border: 1px solid #999;
+
@@ -48,7 +49,7 @@ border: 1px solid #999;

支付失败

-返回 +返回
@@ -62,8 +63,21 @@ border: 1px solid #999; diff --git a/ThinkPHP/Library/Think/Pay/Driver/Alipay.class.php b/ThinkPHP/Library/Think/Pay/Driver/Alipay.class.php index 26fa0e91e..76dff8521 100644 --- a/ThinkPHP/Library/Think/Pay/Driver/Alipay.class.php +++ b/ThinkPHP/Library/Think/Pay/Driver/Alipay.class.php @@ -66,7 +66,7 @@ class Alipay extends \Think\Pay\Pay $param['return_url'] = $returnUrl; else $param['return_url']='http://' . $_SERVER ['HTTP_HOST'] . "/sdk.php/Spend/pay_success"; - $param['show_url'] = 'http://' . $_SERVER ['HTTP_HOST'] . "/sdk.php/Spend/pay_error"; + $param['show_url'] = 'http://' . $_SERVER ['HTTP_HOST'] . "/sdk.php/Spend/pay_error/game_id/".$vo->getGameId(); break; case 'refund': $param['seller_email'] = $this->config['email']; From 1f1954e9f15f84c0720a79da1cf8b3d1aa8fa121 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 30 Sep 2019 17:03:46 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=88=86=E5=8C=85?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/AutoPackController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index 69c4a53c4..c883bcd6a 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -366,7 +366,7 @@ class AutoPackController extends Think $new_name = "game_package" . $value['game_id'] . "-" . $value['promote_id'] . $str_ver; $to = "./Uploads/" . $file_name . "/" . $new_name; $localPath = ROOTTT . ltrim($to, './'); - copy(get_game_source_file_url($value['game_id']), ROOTTT . ltrim($to, './')); + copy(get_game_source_file_url($value['game_id']), $localPath); $zip_res = $zip -> open(ROOTTT . ltrim($to, './'), \ZipArchive::CREATE); if ($zip_res == true) { #打包数据 From fd8c59f1141584177550039635e41b25448ac018 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 30 Sep 2019 17:13:53 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=88=86=E5=8C=85?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/AutoPackController.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index c883bcd6a..e23db14e8 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -398,11 +398,10 @@ class AutoPackController extends Think $updata['savename'] = $newname; $updata['path'] = $new_to; $result = $this -> upload_game_pak_oss($updata); - @unlink($new_to); if ($result) { - if (file_exists($localPath)) { - unlink($localPath); + if (file_exists($new_to)) { + @unlink($new_to); } } } elseif (get_tool_status("qiniu_storage") == 1) {