Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
ELF 5 years ago
commit b6010c5934

@ -37,7 +37,6 @@ class AutoPackController extends Think
public function package() public function package()
{ {
$find_web_stie = M('config') $find_web_stie = M('config')
-> field('value') -> field('value')
-> where(['name' => 'WEB_SITE']) -> where(['name' => 'WEB_SITE'])
@ -49,18 +48,10 @@ class AutoPackController extends Think
} }
$this->checkPackageStatus(); $this->checkPackageStatus();
$this->app_package();//app渠道自动打包 $this->app_package();//app渠道自动打包
$this->channel(); $this->channel();
$this->launch_package(false); $this->launch_package(false);
$this->leak_detection(); $this->leak_detection();
} }
/** /**
@ -311,7 +302,6 @@ class AutoPackController extends Think
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
private function channel() { private function channel() {
$zip = new \ZipArchive(); $zip = new \ZipArchive();
$map['status'] = 1; $map['status'] = 1;
@ -346,13 +336,11 @@ class AutoPackController extends Think
$launchCount = $launchModel->where(['apply_id'=>$value['id']])->count(); $launchCount = $launchModel->where(['apply_id'=>$value['id']])->count();
if($launchCount>0) { if($launchCount>0) {
$applyModel->where(['id' => $value['id']]) -> setField('enable_status', 3); $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'=>'']); $launchModel->where(['apply_id'=>$value['id'], 'launch_packge'=>['in',[0,2,3]]])->save(['launch_packge'=>2,'launch_down_url'=>'','launch_plist_url'=>'']);
} else { } else {
$applyModel -> where(['id' => $value['id']]) -> setField('enable_status', 3); $applyModel -> where(['id' => $value['id']]) -> setField('enable_status', 3);
if ($value['sdk_version'] == 1) { if ($value['sdk_version'] == 1) {
@ -377,7 +365,8 @@ class AutoPackController extends Think
} }
$new_name = "game_package" . $value['game_id'] . "-" . $value['promote_id'] . $str_ver; $new_name = "game_package" . $value['game_id'] . "-" . $value['promote_id'] . $str_ver;
$to = "./Uploads/" . $file_name . "/" . $new_name; $to = "./Uploads/" . $file_name . "/" . $new_name;
copy(get_game_source_file_url($value['game_id']), ROOTTT . ltrim($to, './')); $localPath = ROOTTT . ltrim($to, './');
copy(get_game_source_file_url($value['game_id']), $localPath);
$zip_res = $zip -> open(ROOTTT . ltrim($to, './'), \ZipArchive::CREATE); $zip_res = $zip -> open(ROOTTT . ltrim($to, './'), \ZipArchive::CREATE);
if ($zip_res == true) { if ($zip_res == true) {
#打包数据 #打包数据
@ -408,9 +397,13 @@ class AutoPackController extends Think
$new_to = ROOTTT . "Uploads/" . $file_name . "/" . $newname; $new_to = ROOTTT . "Uploads/" . $file_name . "/" . $newname;
$updata['savename'] = $newname; $updata['savename'] = $newname;
$updata['path'] = $new_to; $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($new_to)) {
@unlink($new_to);
}
}
} elseif (get_tool_status("qiniu_storage") == 1) { } elseif (get_tool_status("qiniu_storage") == 1) {
$this -> dleteQiNiuFile($newname); $this -> dleteQiNiuFile($newname);

@ -146,6 +146,9 @@ class SpendController extends Controller {
$this->display ( 'pay_success' ); $this->display ( 'pay_success' );
} }
public function pay_error() { public function pay_error() {
$Scheme = file_get_contents ( "./Application/Sdk/Scheme/" . $_GET ['game_id'] . ".txt" );
$this->assign ('Scheme', $Scheme?$Scheme:'txplatformsdk');
$this->display (); $this->display ();
} }
public function notice($user_id = 0, $game_id = 0, $msg = '') { public function notice($user_id = 0, $game_id = 0, $msg = '') {

@ -41,6 +41,7 @@ border: 1px solid #999;
</style> </style>
<div class="news_area" style="padding:0px;"> <div class="news_area" style="padding:0px;">
<input type="hidden" value="{$Scheme}" id="scheme"/>
<!--未绑定--> <!--未绑定-->
<div class="pay_suc"> <div class="pay_suc">
@ -48,7 +49,7 @@ border: 1px solid #999;
<h3>支付失败</h3> <h3>支付失败</h3>
<!-- <p>商品名称: 赤月传说</p> --> <!-- <p>商品名称: 赤月传说</p> -->
<!-- <p>商品金额: 8887845</p> --> <!-- <p>商品金额: 8887845</p> -->
<a href="mengchuang://showWapPayResult_btnType_?0&back">返回</a> <a href="{$Scheme}://showWapPayResult_btnType_?0&back">返回</a>
</div> </div>
<!--未绑定结束--> <!--未绑定结束-->
@ -62,8 +63,21 @@ border: 1px solid #999;
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
location.href = "mengchuang://showWapPayResult_btnType_?0&ss"; var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
try{
if(isAndroid){
window.mengchuang.getPayResult('fail');
}else{
window.webkit.messageHandlers.exchangeResult.postMessage(0);
}
}catch(err){
/* setTimeout(function () {
window.location.href= "/mobile.php?s=/User/index.html";
},1000) */
}
// location.href = $("#scheme").val()+"://showWapPayResult_btnType_?0&ss";
}) })
</script> </script>

@ -66,7 +66,7 @@ class Alipay extends \Think\Pay\Pay
$param['return_url'] = $returnUrl; $param['return_url'] = $returnUrl;
else else
$param['return_url']='http://' . $_SERVER ['HTTP_HOST'] . "/sdk.php/Spend/pay_success"; $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; break;
case 'refund': case 'refund':
$param['seller_email'] = $this->config['email']; $param['seller_email'] = $this->config['email'];

Loading…
Cancel
Save