|
|
@ -101,6 +101,10 @@ class HomeController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
public function promitionofregestion()
|
|
|
|
public function promitionofregestion()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
// 旧版兼容
|
|
|
|
|
|
|
|
A('Home')->landingPage();
|
|
|
|
|
|
|
|
die();
|
|
|
|
|
|
|
|
|
|
|
|
$gameData = M('Game', 'tab_')
|
|
|
|
$gameData = M('Game', 'tab_')
|
|
|
|
->field('relation_game_id,sdk_version')
|
|
|
|
->field('relation_game_id,sdk_version')
|
|
|
|
->where(array('id' => intval($_GET['gid'])))
|
|
|
|
->where(array('id' => intval($_GET['gid'])))
|
|
|
@ -131,9 +135,18 @@ class HomeController extends Controller
|
|
|
|
public function landingPage()
|
|
|
|
public function landingPage()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$code = I('code', '');
|
|
|
|
$code = I('code', '');
|
|
|
|
if ($code == '') {
|
|
|
|
$gameId = I('gid', 0);
|
|
|
|
$this->redirect("download/downloadError", ['message' => '访问错误']);
|
|
|
|
$promoteId = I('pid', 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($code == '' && ($gameId == 0 || $promoteId == 0)) {
|
|
|
|
|
|
|
|
$this->error('访问错误');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$blackList = [];
|
|
|
|
|
|
|
|
if (in_array($code, $blackList) || in_array('gid/' . $gameId . '/pid/' . $promoteId, $blackList)) {
|
|
|
|
|
|
|
|
$this->error('该链接已被禁');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($code != '') {
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
$data = $applyService->decodeApplyCode($code);
|
|
|
|
$data = $applyService->decodeApplyCode($code);
|
|
|
|
$result = $applyService->checkApplyCode($data, ApplyService::ENCRYPT_TYPE_LANDING_PAGE);
|
|
|
|
$result = $applyService->checkApplyCode($data, ApplyService::ENCRYPT_TYPE_LANDING_PAGE);
|
|
|
@ -141,6 +154,10 @@ class HomeController extends Controller
|
|
|
|
$this->error($result['message']);
|
|
|
|
$this->error($result['message']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$gameId = $data['game_id'];
|
|
|
|
|
|
|
|
$promoteId = $data['promote_id'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$isWechat = Request::isWechat();
|
|
|
|
$isWechat = Request::isWechat();
|
|
|
|
$isIOS = Request::isIOS();
|
|
|
|
$isIOS = Request::isIOS();
|
|
|
|
$isAndroid = Request::isAndroid();
|
|
|
|
$isAndroid = Request::isAndroid();
|
|
|
@ -157,7 +174,7 @@ class HomeController extends Controller
|
|
|
|
'features',
|
|
|
|
'features',
|
|
|
|
'flooring_page_imgs',
|
|
|
|
'flooring_page_imgs',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
$map = ['id' => intval($data['game_id'])];
|
|
|
|
$map = ['id' => intval($gameId)];
|
|
|
|
|
|
|
|
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
|
|
|
|
|
|
|
|
@ -171,7 +188,7 @@ class HomeController extends Controller
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
|
$game = M('game', 'tab_')->field($columns)->where($map)->find();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$apply = M('apply', 'tab_')->field(['game_id', 'enable_status', 'promote_id'])
|
|
|
|
$apply = M('apply', 'tab_')->field(['game_id', 'enable_status', 'promote_id'])
|
|
|
|
->where(['promote_id' => $data['promote_id'], 'game_id' => $game['id']])
|
|
|
|
->where(['promote_id' => $promoteId, 'game_id' => $game['id']])
|
|
|
|
->find();
|
|
|
|
->find();
|
|
|
|
$game['icon'] = get_cover($game['icon'], 'path');
|
|
|
|
$game['icon'] = get_cover($game['icon'], 'path');
|
|
|
|
|
|
|
|
|
|
|
|