|
|
@ -181,10 +181,12 @@ class HomeController extends Controller
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
|
|
|
|
|
|
|
|
|
if ($game['sdk_version'] == 1 && $isIOS) {
|
|
|
|
if ($game['sdk_version'] == 1 && $isIOS) {
|
|
|
|
|
|
|
|
$map = [];
|
|
|
|
$map['relation_game_id'] = $game['relation_game_id'];
|
|
|
|
$map['relation_game_id'] = $game['relation_game_id'];
|
|
|
|
$map['sdk_version'] = 2;
|
|
|
|
$map['sdk_version'] = 2;
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
|
} elseif ($game['sdk_version'] == 2 && $isAndroid) {
|
|
|
|
} elseif ($game['sdk_version'] == 2 && $isAndroid) {
|
|
|
|
|
|
|
|
$map = [];
|
|
|
|
$map['relation_game_id'] = $game['relation_game_id'];
|
|
|
|
$map['relation_game_id'] = $game['relation_game_id'];
|
|
|
|
$map['sdk_version'] = 1;
|
|
|
|
$map['sdk_version'] = 1;
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
@ -194,6 +196,8 @@ class HomeController extends Controller
|
|
|
|
->find();
|
|
|
|
->find();
|
|
|
|
$game['icon'] = get_cover($game['icon'], 'path');
|
|
|
|
$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']) ?? [];
|
|
|
|
$imageIds = explode(',', $game['flooring_page_imgs']) ?? [];
|
|
|
|
$imageUrls = [];
|
|
|
|
$imageUrls = [];
|
|
|
|
foreach ($imageIds as $imageId) {
|
|
|
|
foreach ($imageIds as $imageId) {
|
|
|
@ -203,13 +207,18 @@ class HomeController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
$downloadUrl = '';
|
|
|
|
$downloadUrl = '';
|
|
|
|
if ($isIOS13) {
|
|
|
|
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'], '.');
|
|
|
|
$downloadUrl = 'itms-services://?action=download-manifest&url=' . Request::getHost() . ltrim($gameSource['org_plist_url'], '.');
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
$downloadUrl = $applyService->getDownloadUrl($apply);
|
|
|
|
$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('downloadUrl', $downloadUrl);
|
|
|
|
$this->assign('isIOS13', $isIOS13);
|
|
|
|
$this->assign('isIOS13', $isIOS13);
|
|
|
|
$this->assign('isWechat', $isWechat);
|
|
|
|
$this->assign('isWechat', $isWechat);
|
|
|
|