外团可申请游戏bug修改

master
zhengyongxing 4 years ago
parent e30cd2fea7
commit 86769746ef

@ -1663,4 +1663,29 @@ class MarketPercentageController extends ThinkController
} }
//获取推广员可推广游戏
public function getPromoteGame()
{
if (IS_AJAX) {
//获取所有游戏
$promoteId = I('id', 0, 'intval');
$promote = M('promote', 'tab_')->field('id,account,game_ids,company_id')->where(['id'=>$promoteId])->find();
$company = M('promote_company', 'tab_')->field('game_ids')->where(['id' => $promote['company_id']])->find();
$data = [];
$games = M('game', 'tab_')
->field('relation_game_id id,relation_game_name game_name,short')
->where(['game_status'=>1])
->group("relation_game_id")
->select();
$data['data']['game_list'] = empty($games) ? '' : $games;
$data['msg'] = '请求成功';
$data['code'] = 1;
$this->ajaxReturn($data);
exit;
}
}
} }

@ -293,7 +293,7 @@
//打开弹窗 //打开弹窗
$(".ajax-view").click(function(){ $(".ajax-view").click(function(){
//获取游戏列表 //获取游戏列表
var url = "{:U('Promote/getPromoteGame')}"; var url = "{:U('MarketPercentage/getPromoteGame')}";
var id = $(this).attr('data-id'); var id = $(this).attr('data-id');
var checked = 'checked'; var checked = 'checked';
@ -330,8 +330,7 @@
$(".jsgamecheckall").attr('checked',checked); $(".jsgamecheckall").attr('checked',checked);
$("#game_list").html(lis.join('')); $("#game_list").html(lis.join(''));
$(".pro_promot_number").text(res.data.promote_info.account);
$("#se_promote_id").val(res.data.promote_info.id);
$(".pro_promot").css("display","block"); $(".pro_promot").css("display","block");
jsgameid(); jsgameid();

@ -294,7 +294,7 @@
//打开弹窗 //打开弹窗
$(".ajax-view").click(function(){ $(".ajax-view").click(function(){
//获取游戏列表 //获取游戏列表
var url = "{:U('Promote/getPromoteGame')}"; var url = "{:U('MarketPercentage/getPromoteGame')}";
var id = $(this).attr('data-id'); var id = $(this).attr('data-id');
var checked = 'checked'; var checked = 'checked';
@ -331,8 +331,7 @@
$(".jsgamecheckall").attr('checked',checked); $(".jsgamecheckall").attr('checked',checked);
$("#game_list").html(lis.join('')); $("#game_list").html(lis.join(''));
$(".pro_promot_number").text(res.data.promote_info.account);
$("#se_promote_id").val(res.data.promote_info.id);
$(".pro_promot").css("display","block"); $(".pro_promot").css("display","block");
jsgameid(); jsgameid();

Loading…
Cancel
Save