修改推广后台首页

master
ELF 5 years ago
parent 16d458155a
commit e2d75ec2c6

@ -294,17 +294,11 @@ class AutoPackController extends Think
* 渠道游戏打包 * 渠道游戏打包
*/ */
private function channel() { private function channel() {
$zip = new \ZipArchive(); $map = [];
$map['status'] = 1; $map['status'] = 1;
$map['enable_status'] = ['in', '0,2,3']; $map['enable_status'] = ['in', '0,2,3'];
$applyModel = M('apply', 'tab_'); $applys = M('apply', 'tab_')->field('id,game_id,game_name,promote_id,promote_account,sdk_version')
$gameSourceModel = M('Game_source', 'tab_');
$launchModel = M('apply_launch', 'tab_');
$applys = $applyModel
->field('id,game_id,game_name,promote_id,promote_account,sdk_version')
->where($map) ->where($map)
->order('bale_sort desc,id desc') ->order('bale_sort desc,id desc')
->limit(200) ->limit(200)
@ -319,7 +313,7 @@ class AutoPackController extends Think
$games = M('game', 'tab_')->field(['id', 'game_appid', 'game_name', 'icon', 'sdk_version'])->where(['id' => ['in', $gameIds]])->select(); $games = M('game', 'tab_')->field(['id', 'game_appid', 'game_name', 'icon', 'sdk_version'])->where(['id' => ['in', $gameIds]])->select();
$games = index_by_column('id', $games); $games = index_by_column('id', $games);
$launchCountList = $launchModel->field(['apply_id', 'count(*) count'])->where(['apply_id' => ['in', $applyIds]])->group('apply_id')->select(); $launchCountList = M('apply_launch', 'tab_')->field(['apply_id', 'count(*) count'])->where(['apply_id' => ['in', $applyIds]])->group('apply_id')->select();
$launchCountList = index_by_column('apply_id', $launchCountList); $launchCountList = index_by_column('apply_id', $launchCountList);
$gameSources = M('game_source', 'tab_')->field(['id', 'file_name', 'source_version', 'file_type', 'bao_name', 'game_id'])->where(['game_id' => ['in', $gameIds]])->select(); $gameSources = M('game_source', 'tab_')->field(['id', 'file_name', 'source_version', 'file_type', 'bao_name', 'game_id'])->where(['game_id' => ['in', $gameIds]])->select();

@ -37,9 +37,8 @@ class PromoteController extends BaseController
{ {
$this->meta_title = "首页"; $this->meta_title = "首页";
$loginPromote = $this->getLoginPromote(); $loginPromote = $this->getLoginPromote();
$whiteList = [1, 8, 84]; $isOpenQuery = true;
$isOpenQuery = in_array($loginPromote['id'], $whiteList) || in_array($loginPromote['parent_id'], $whiteList) || in_array($loginPromote['grand_id'], $whiteList) ? true : false;
if (!$isOpenQuery) { if (!$isOpenQuery) {
$this->display('prepare'); $this->display('prepare');

Loading…
Cancel
Save