@ -215,17 +215,17 @@ class ApplyController extends BaseController
$map['tab_game.game_status'] = 1;//游戏状态
$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();
foreach ($applyPromote as $key => $value) {
$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')
->where(['id' => $applyPromoteGameId])->select();
if($gameInfo[0]['developers'] > 0){
if ($gameInfo[0]['developers'] > 0) {
unset($gameInfo[0]['developers']);
$noDeveloperGameArr[] = $gameInfo[0]['id'] ; //非开发者游戏
$noDeveloperGameArr[] = $gameInfo[0]['id']; //非开发者游戏
}
}
@ -246,7 +246,7 @@ class ApplyController extends BaseController
$where['_complex'] = $map;
// $where['tab_game.id'] = ['in',$noDeveloperGameArr];
// $where['_logic']='or';
}else {
} else {
$where['_complex'] = $map;
if(empty($noDeveloperGameArr)) {
$where['tab_game.id'] = ['in','-100'];
@ -1732,16 +1732,17 @@ class ApplyController extends BaseController
$this->ajaxReturn(['status' => 1, 'data' => $enableStatus]);
}
public function backDetailData() { //返回详情数据
$result = ['code' => 10001,'msg' => "该游戏信息不存在,请确认!",'error' => 1,'info' => ''];
public function backDetailData()
{ //返回详情数据
$result = ['code' => 10001, 'msg' => "该游戏信息不存在,请确认!", 'error' => 1, 'info' => ''];
$id = $_POST['id'];
if(empty($id)) {
if (empty($id)) {
$this->ajaxReturn($result);
}
$gameInfo = M('Game','tab_')->where(['id' => $id])->getField('detail_content');
if(!$gameInfo) {
$gameInfo = M('Game', 'tab_')->where(['id' => $id])->getField('detail_content');
if (!$gameInfo) {
$this->ajaxReturn($result);
}else {
} else {
$result['code'] = 10000;
$result['msg'] = "获取信息成功";
$result['error'] = -1;