修改bug

master
ELF 5 years ago
parent 6403bc9859
commit c0f19228d2

@ -97,6 +97,23 @@ class SourceEvent extends Controller
}
$data['source_version'] = $game_source['source_version'] + 1;
$version = '';
$packageName = '';
if ($data['file_type'] == 1) {
$parser = new ApkParser();
$parser->open($data['file_url']);
$version = $parser->getVersionName();
$packageName = $parser->getPackage();
} elseif($data['file_type'] == 2) {
$parser = new PlistParser();
$parser->openFromIpa($data['file_url'], PlistParser::PREG_INFO_PLIST);
$result = $parser->getResult();
$version = $result['CFBundleShortVersionString'];
$packageName = $result['CFBundleIdentifier'];
}
$data['version'] = $version;
$data['bao_name'] = $packageName;
$game = M('game', 'tab_')->where(['id' => $data['game_id']])->find();
$gameSourceService = new GameSourceService();
$result = $gameSourceService->sourcePack($data, $game);

@ -182,6 +182,7 @@ class GameSourceService {
'gameIcon' => get_cover($game['icon'], 'path'),
'type' => 'pack'
];
$result = $this->createPlist($params);
if ($result['status']) {
$plistUrl = $result['data']['path'];
@ -412,7 +413,6 @@ class GameSourceService {
} elseif ($type == 'org') {
$fileName = 'Uploads/OrgSourcePlist/'. $gameId . '.Plist';
}
$xml->save('./' . $fileName);
return [
'status' => true,

@ -30,7 +30,7 @@ class PackageController extends Controller
$code = I('code', '');
$gameId = I('game_id', 0);
$promoteId = I('promote_id', 0);
// var_dump($gameId, $promoteId);die();
if ($code == '' && ($gameId == 0 || $promoteId == 0)) {
$this->redirect("package/downloadError", ['message' => '访问错误']);
}

@ -50,7 +50,7 @@
return
}
if ($('input[name=isIOS13]').val() == 1) {
if (parseInt("{:I('get.status')}") > 0) {
if (parseInt("{:I('get.status', 0)}") > 0) {
location.href = "{:U('iosDown',array('gid'=>$apply['game_id'],'pid'=>$apply['promote_id'],'status'=>1))}"
return
} else {

Loading…
Cancel
Save