master
ELF 5 years ago
parent 4f1bd88dc2
commit 9a2ec81bec

@ -181,10 +181,12 @@ class HomeController extends Controller
$game = M('game', 'tab_')->field($columns)->where($map)->find();
if ($game['sdk_version'] == 1 && $isIOS) {
$map = [];
$map['relation_game_id'] = $game['relation_game_id'];
$map['sdk_version'] = 2;
$game = M('game', 'tab_')->field($columns)->where($map)->find();
} elseif ($game['sdk_version'] == 2 && $isAndroid) {
$map = [];
$map['relation_game_id'] = $game['relation_game_id'];
$map['sdk_version'] = 1;
$game = M('game', 'tab_')->field($columns)->where($map)->find();
@ -194,6 +196,8 @@ class HomeController extends Controller
->find();
$game['icon'] = get_cover($game['icon'], 'path');
$gameSource = M('GameSource', 'tab_')->field(['create_time', 'org_plist_url'])->where(array('game_id' => $game['id']))->find();
$imageIds = explode(',', $game['flooring_page_imgs']) ?? [];
$imageUrls = [];
foreach ($imageIds as $imageId) {
@ -203,13 +207,18 @@ class HomeController extends Controller
$downloadUrl = '';
if ($isIOS13) {
$gameSource = M('GameSource', 'tab_')->where(array('game_id' => $game['id']))->getField('org_plist_url');
$downloadUrl = 'itms-services://?action=download-manifest&url=' . Request::getHost() . ltrim($gameSource['org_plist_url'], '.');
} else {
$applyService = new ApplyService();
$downloadUrl = $applyService->getDownloadUrl($apply);
}
$isNewIos = false;
if ($gameSource['create_time'] > strtotime(date('2019-11-27 00:00:00'))) {
$isNewIos = true;
}
$this->assign('isNewIos', $isNewIos);
$this->assign('downloadUrl', $downloadUrl);
$this->assign('isIOS13', $isIOS13);
$this->assign('isWechat', $isWechat);

@ -21,6 +21,7 @@
<input type="hidden" name="icon" value="{$game['icon']}">
<input type="hidden" name="desc" value="{$game['features']}">
<input type="hidden" name="isIOS13" value="<?php if($isIOS13):?>1<?php else:?>0<?php endif;?>">
<input type="hidden" name="isNewIos" value="<?php if($isNewIos):?>1<?php else:?>0<?php endif;?>">
<?php if ($isWechat):?>
<?php if ($isAndroid):?>
<div class="bn-rule" style="display: none;"><img id="rule-img" src="__STATIC__/ios9/images/android-rule.png"></div>
@ -49,7 +50,7 @@
$('.bn-rule').css('z-index','12')
return
}
if ($('input[name=isIOS13]').val() == 1) {
if ($('input[name=isNewIos]').val() == 1 && $('input[name=isIOS13]').val() == 1) {
if (parseInt("{:I('get.status', 0)}") > 0) {
location.href = "{:U('iosDown',array('gid'=>$apply['game_id'],'pid'=>$apply['promote_id'],'status'=>1))}"
return

Loading…
Cancel
Save