|
|
|
@ -91,14 +91,14 @@ class PackageController extends Controller
|
|
|
|
|
$map = [];
|
|
|
|
|
$map['status'] = 1;
|
|
|
|
|
$map['enable_status'] = 1;
|
|
|
|
|
$map['game_id'] = $game['game_id'];
|
|
|
|
|
$map['game_id'] = $game['id'];
|
|
|
|
|
$map['promote_id'] = $promoteId;
|
|
|
|
|
$apply = M('apply','tab_')->where($map)->find();
|
|
|
|
|
if (!$apply) {
|
|
|
|
|
$this->redirect("package/downloadError", ['message' => '该链接已经停止使用']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$packageUrl = $sdkVersion == 1 ? $apply['pack_url'] : $apply['plist_url'];
|
|
|
|
|
$packageUrl = $game['sdk_version'] == 1 ? $apply['pack_url'] : $apply['plist_url'];
|
|
|
|
|
|
|
|
|
|
$url = $applyService->getLandingPageUrl($apply, $code);
|
|
|
|
|
M('game','tab_')->where(['id' => $game['id']])->setInc('dow_num');
|
|
|
|
@ -113,7 +113,7 @@ class PackageController extends Controller
|
|
|
|
|
M('user_action_log', 'tab_')->data($log)->add();
|
|
|
|
|
|
|
|
|
|
$downloadDomain = $applyService->getDownloadDomain();
|
|
|
|
|
if ($sdkVersion == 2) {
|
|
|
|
|
if ($game['sdk_version'] == 2) {
|
|
|
|
|
$packageDownloadLogService = new PackageDownloadLogService();
|
|
|
|
|
$packageDownloadLogService->add([
|
|
|
|
|
'user_id' => 0,
|
|
|
|
|