解决冲突

master
ELF 5 years ago
commit cc9aa1a640

@ -196,8 +196,8 @@ class ApplyController extends BaseController
$this->meta_title = "申请游戏"; $this->meta_title = "申请游戏";
$this->display('index'); $this->display('index');
} }
//查看游戏资料专区 //查看游戏资料专区
public function feature($p = 0, $type = 0) public function feature($p = 0, $type = 0)
{ {
$promoteId = empty(I('promote_id')) ? PID : I('promote_id');//搜索的渠道ID $promoteId = empty(I('promote_id')) ? PID : I('promote_id');//搜索的渠道ID
@ -214,21 +214,21 @@ class ApplyController extends BaseController
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请 $map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
$map['tab_game.game_status'] = 1;//游戏状态 $map['tab_game.game_status'] = 1;//游戏状态
$map['tab_game.developers'] = 0; //平台游戏(官网游戏,非开发者游戏) $map['tab_game.developers'] = 0; //平台游戏(官网游戏,非开发者游戏)
$applyPromote = M('apply','tab_')->field('game_id')->where(['promote_id' => $promoteId])->select(); $applyPromote = M('apply', 'tab_')->field('game_id')->where(['promote_id' => $promoteId])->select();
$noDeveloperGameArr = array(); $noDeveloperGameArr = array();
foreach ($applyPromote as $key => $value) { foreach ($applyPromote as $key => $value) {
$applyPromoteGameId = $value['game_id']; $applyPromoteGameId = $value['game_id'];
$gameInfo = M('Game','tab_') $gameInfo = M('Game', 'tab_')
->field('id,icon,game_name,features,sdk_version,game_size,game_type_name,relation_game_name,developers') ->field('id,icon,game_name,features,sdk_version,game_size,game_type_name,relation_game_name,developers')
->where(['id' => $applyPromoteGameId])->select(); ->where(['id' => $applyPromoteGameId])->select();
if($gameInfo[0]['developers'] > 0){ if ($gameInfo[0]['developers'] > 0) {
unset($gameInfo[0]['developers']); unset($gameInfo[0]['developers']);
$noDeveloperGameArr[] = $gameInfo[0]['id'] ; //非开发者游戏 $noDeveloperGameArr[] = $gameInfo[0]['id']; //非开发者游戏
} }
} }
$page = intval($p); $page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据 $page = $page ? $page : 1; //默认显示第一页数据
@ -244,9 +244,9 @@ class ApplyController extends BaseController
$map['tab_game.relation_game_name'] = ['like', $thisRelationGameName]; $map['tab_game.relation_game_name'] = ['like', $thisRelationGameName];
$where['_complex'] = $map; $where['_complex'] = $map;
// $where['tab_game.id'] = ['in',$noDeveloperGameArr]; // $where['tab_game.id'] = ['in',$noDeveloperGameArr];
// $where['_logic']='or'; // $where['_logic']='or';
}else { } else {
$where['_complex'] = $map; $where['_complex'] = $map;
if(empty($noDeveloperGameArr)) { if(empty($noDeveloperGameArr)) {
$where['tab_game.id'] = ['in','-100']; $where['tab_game.id'] = ['in','-100'];
@ -256,7 +256,7 @@ class ApplyController extends BaseController
$where['_logic']='or'; $where['_logic']='or';
} }
$data = M('Game', 'tab_') $data = M('Game', 'tab_')
->field('tab_game.id,tab_game.icon,tab_game.game_name,tab_game.features,tab_game.sdk_version,tab_game.game_size,tab_game.game_type_name,tab_game.relation_game_name,ta_1.id as apply_id_1') ->field('tab_game.id,tab_game.icon,tab_game.game_name,tab_game.features,tab_game.sdk_version,tab_game.game_size,tab_game.game_type_name,tab_game.relation_game_name,ta_1.id as apply_id_1')
->join('left join tab_apply as ta_1 on tab_game.id = ta_1.game_id and ta_1.offline_status = 0 and ta_1.promote_id = ' . $promoteId)//查询是否拥有该游戏 ->join('left join tab_apply as ta_1 on tab_game.id = ta_1.game_id and ta_1.offline_status = 0 and ta_1.promote_id = ' . $promoteId)//查询是否拥有该游戏
@ -265,7 +265,7 @@ class ApplyController extends BaseController
->page($page, $row) ->page($page, $row)
->select(); ->select();
//$AllData = array_merge($noDeveloperGameArr,$data); //$AllData = array_merge($noDeveloperGameArr,$data);
/* 查询记录总数 */ /* 查询记录总数 */
$count = M("Game", "tab_") $count = M("Game", "tab_")
->field('tab_game.id') ->field('tab_game.id')
@ -288,13 +288,13 @@ class ApplyController extends BaseController
$this->assign('list_data', $data); $this->assign('list_data', $data);
$this->assign("count", $count); $this->assign("count", $count);
$this->assign("promoteId", $promoteId); $this->assign("promoteId", $promoteId);
// $this->assign('parentPromoteId', $parentPromoteId); // $this->assign('parentPromoteId', $parentPromoteId);
$this->assign('thisParentPromoteId', $thisParentPromoteId); $this->assign('thisParentPromoteId', $thisParentPromoteId);
// $this->assign('promoteRole', $promoteRole); // $this->assign('promoteRole', $promoteRole);
$this->assign('pID', PID); $this->assign('pID', PID);
//$this->assign('promoteData', getAllPromoteListByType($promoteRole)); //$this->assign('promoteData', getAllPromoteListByType($promoteRole));
// $this->assign('addPermission', $addPermission); // $this->assign('addPermission', $addPermission);
// $this->assign('type', $type); // $this->assign('type', $type);
$this->meta_title = "申请游戏"; $this->meta_title = "申请游戏";
@ -1731,25 +1731,26 @@ class ApplyController extends BaseController
$this->ajaxReturn(['status' => 1, 'data' => $enableStatus]); $this->ajaxReturn(['status' => 1, 'data' => $enableStatus]);
} }
public function backDetailData() { //返回详情数据 public function backDetailData()
$result = ['code' => 10001,'msg' => "该游戏信息不存在,请确认!",'error' => 1,'info' => '']; { //返回详情数据
$result = ['code' => 10001, 'msg' => "该游戏信息不存在,请确认!", 'error' => 1, 'info' => ''];
$id = $_POST['id']; $id = $_POST['id'];
if(empty($id)) { if (empty($id)) {
$this->ajaxReturn($result); $this->ajaxReturn($result);
} }
$gameInfo = M('Game','tab_')->where(['id' => $id])->getField('detail_content'); $gameInfo = M('Game', 'tab_')->where(['id' => $id])->getField('detail_content');
if(!$gameInfo) { if (!$gameInfo) {
$this->ajaxReturn($result); $this->ajaxReturn($result);
}else { } else {
$result['code'] = 10000; $result['code'] = 10000;
$result['msg'] = "获取信息成功"; $result['msg'] = "获取信息成功";
$result['error'] = -1; $result['error'] = -1;
$result['info'] = $gameInfo; $result['info'] = $gameInfo;
$this->ajaxReturn($result); $this->ajaxReturn($result);
} }
} }
} }

@ -117,15 +117,19 @@ class HomeController extends Controller
{ {
$gameData = M('Game', 'tab_') $gameData = M('Game', 'tab_')
->field('relation_game_id,sdk_version') ->field('relation_game_id,sdk_version')
->where(array('id' => $_GET['gid'])) ->where(array('id' => intval($_GET['gid'])))
->find(); ->find();
$RelationGameId = $gameData['relation_game_id']; $RelationGameId = $gameData['relation_game_id'];
$gameSdkType = $gameData['sdk_version']; $gameSdkType = $gameData['sdk_version'];
$map['tab_game.relation_game_id'] = $RelationGameId; $map['tab_game.relation_game_id'] = $RelationGameId;
$map['ta.promote_id'] = $_GET['pid']; $data = M('game', 'tab_')
$data = M('game', 'tab_')->field('tab_game.id,tab_game.sdk_version,tab_game.icon,tab_game.screenshot,tab_game.relation_game_id,tab_game.relation_game_name,ta.enable_status,tab_game.dow_status,tab_game.features,tab_game.flooring_page_imgs')->where($map)->join('tab_apply ta ON ta.game_id = tab_game.id and ta.offline_status = 0 and ta.promote_id=' . $_GET['pid'])->select(); ->field('tab_game.id,tab_game.sdk_version,tab_game.icon,tab_game.screenshot,tab_game.relation_game_id,tab_game.relation_game_name,ta.enable_status,tab_game.dow_status,tab_game.features,tab_game.flooring_page_imgs,ta.promote_id')
->join('tab_apply ta ON ta.game_id = tab_game.id and ta.offline_status = 0 and ta.promote_id=' . intval($_GET['pid']))
->where($map)
->group('tab_game.id')
->select();
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
if (!empty($value['flooring_page_imgs'])) { if (!empty($value['flooring_page_imgs'])) {

@ -129,7 +129,6 @@
</div> </div>
</div> </div>
</div>
<div class="head"> <div class="head">
<div class="m1200"> <div class="m1200">
<a href="{:U('Index/index')}" class="logo"> <a href="{:U('Index/index')}" class="logo">
@ -170,10 +169,11 @@
<li> <li>
<a class="khd" target="_blank" href="{:U('Index/download')}" ><span>{:C('PC_NAVIGATION_CLIENT')?C('PC_NAVIGATION_CLIENT'):'客户端'}</span><i></i></a> <a class="khd" target="_blank" href="{:U('Index/download')}" ><span>{:C('PC_NAVIGATION_CLIENT')?C('PC_NAVIGATION_CLIENT'):'客户端'}</span><i></i></a>
</li> </li>
</if> <!-- </if>-->
</ul> </ul>
</div> </div>
</div> </div>
<!-- 主体内容 --> <!-- 主体内容 -->
<block name="body"></block> <block name="body"></block>
@ -253,9 +253,7 @@
</ul> </ul>
</div> </div>
</div>--> </div>-->
</div>
</div>
<block name="giftextend"></block> <block name="giftextend"></block>
<script> <script>

@ -87,10 +87,10 @@
} }
</style> </style>
<div class="foot-nav-list"> <div class="foot-nav-list">
<!-- <a href="{:U('Index/index')}" class="<if condition='CONTROLLER_NAME eq Index' >on</if>"> <a href="{:U('Index/index')}" class="<if condition='CONTROLLER_NAME eq Index' >on</if>">
<i class="iconfont icon-home"></i> <i class="iconfont icon-home"></i>
<p>首页</p> <p>首页</p>
</a> --> </a>
<if condition="C('IS_OPEN_SMALL_ACCOUNT') neq 0"> <if condition="C('IS_OPEN_SMALL_ACCOUNT') neq 0">
<a href="{:U('Trade/index')}" class="<if condition='CONTROLLER_NAME eq Trade'>on</if>"> <a href="{:U('Trade/index')}" class="<if condition='CONTROLLER_NAME eq Trade'>on</if>">
<i class="iconfont icon-trade"></i> <i class="iconfont icon-trade"></i>
@ -113,20 +113,20 @@
<i class="iconfont icon-shop"></i> <i class="iconfont icon-shop"></i>
<p>商城</p> <p>商城</p>
</a>--> </a>-->
<!-- <a href="{:U('Index/product')}" class="<if condition='CONTROLLER_NAME eq Gift'>on</if>"> <a href="{:U('Index/product')}" class="<if condition='CONTROLLER_NAME eq Gift'>on</if>">
<i class="iconfont icon-gift"></i> <i class="iconfont icon-gift"></i>
<p>产品服务</p> <p>产品服务</p>
</a> </a>
<a href="{:U('Index/business')}" class="<if condition='CONTROLLER_NAME eq Shop'>on</if>"> <a href="{:U('Index/business')}" class="<if condition='CONTROLLER_NAME eq Shop'>on</if>">
<i class="iconfont icon-shop"></i> <i class="iconfont icon-shop"></i>
<p>商务合作</p> <p>商务合作</p>
</a> --> </a>
<!--<a href="{:U('News/index')}" class="<if condition='CONTROLLER_NAME eq News'>on</if>"> <!--<a href="{:U('News/index')}" class="<if condition='CONTROLLER_NAME eq News'>on</if>">
<i class="iconfont icon-news"></i> <i class="iconfont icon-news"></i>
<p>资讯</p> <p>资讯</p>
</a>--> </a>-->
</if> </if>
<a style="width: 100%; margin-left: 0px;" href="{:U('User/index')}" class="<if condition='CONTROLLER_NAME eq User'>on</if>"> <a href="{:U('User/index')}" class="<if condition='CONTROLLER_NAME eq User'>on</if>">
<i class="iconfont icon-user"></i> <i class="iconfont icon-user"></i>
<p>我的</p> <p>我的</p>
</a> </a>

Loading…
Cancel
Save