Merge branch 'feature/promote_all_check' of wmtx/platform into release

推广员游戏列表查看全选问题修正
master
万盟天下 5 years ago committed by Gogs
commit c292e9ed6c

@ -391,7 +391,7 @@
<div class="pro_promot_game"> <div class="pro_promot_game">
<div class="jsgamecheckallbox z_clearfix" > <div class="jsgamecheckallbox z_clearfix" >
<label class="custom-label"> <label class="custom-label">
<input type="checkbox" checked="checked" class="form_control jsgamecheckall" > <input type="checkbox" class="form_control jsgamecheckall" >
<i class="label_icon"></i> <i class="label_icon"></i>
<span class="label_text">全选</span></label> <span class="label_text">全选</span></label>
</div> </div>
@ -567,6 +567,10 @@
//获取游戏列表 //获取游戏列表
var url = "{:U('Promote/getPromoteGame')}"; var url = "{:U('Promote/getPromoteGame')}";
var id = $(this).attr('data-id'); var id = $(this).attr('data-id');
var checked = 'checked';
$.post(url,{id:id},function(res){ $.post(url,{id:id},function(res){
if(res.code==1){ if(res.code==1){
@ -590,14 +594,19 @@
if(promote_info['game_ids'].indexOf(ele.id)>-1){ if(promote_info['game_ids'].indexOf(ele.id)>-1){
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />'); lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" checked="checked" id="gameCheck'+index+'" />');
}else{ }else{
$(".jsgamecheckall").attr('checked',false);
lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />'); lis.push('<input type="checkbox" value="'+ele.id+'" name="game_ids[]" class="fl pro_promot_game_check jsgameid" id="gameCheck'+index+'" />');
checked = '';
} }
} }
lis.push('<label for="gameCheck'+index+'" class="fl"></label>'); lis.push('<label for="gameCheck'+index+'" class="fl"></label>');
lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>'); lis.push('<span class="fl pro_promot_game_name">'+ele.game_name+'</span>');
lis.push('</li>'); lis.push('</li>');
}); });
$(".jsgamecheckall").attr('checked',checked);
$("#game_list").html(lis.join('')); $("#game_list").html(lis.join(''));
$(".pro_promot_number").text(res.data.promote_info.account); $(".pro_promot_number").text(res.data.promote_info.account);
$("#se_promote_id").val(res.data.promote_info.id); $("#se_promote_id").val(res.data.promote_info.id);

Loading…
Cancel
Save