数据统计

master
ELF 5 years ago
parent fc73d458c9
commit b268f1fce6

@ -1901,6 +1901,8 @@ class QueryController extends BaseController
$promote = $loginPromote; $promote = $loginPromote;
} }
$games = $this->getGamesByPromote($promote);
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']])->select(); $subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']])->select();
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']]); $query = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']]);
@ -1976,6 +1978,7 @@ class QueryController extends BaseController
$level = 3; $level = 3;
} }
$this->assign('games', $games);
$this->assign('level', $level); $this->assign('level', $level);
$this->assign('subPromotes', $subPromotes); $this->assign('subPromotes', $subPromotes);
$this->assign('records', $records); $this->assign('records', $records);

@ -23,7 +23,7 @@
</div> </div>
<div class="trunk-content article"> <div class="trunk-content article">
<div class="trunk-search clearfix"> <div class="trunk-search clearfix">
<form action="{:U('Query/userRoles',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data"> <form action="{:U('Query/achievement',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
<div class="form-group normal_space"> <div class="form-group normal_space">
<select id="game-select" name="game_id" class="reselect select_gallery" style="width: 220px;" > <select id="game-select" name="game_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择游戏</option> <option value="0">请选择游戏</option>
@ -174,25 +174,6 @@ $(function() {
}) })
} }
}) })
$('#group-select').on({
change: function name() {
var groupId = $('#group-select').val()
$.ajax({
url: "{:U('Query/getSubPromotes')}",
dataType: 'json',
data: {promote_id: groupId},
success: function(response) {
$("#promote-select").val(0).trigger("change")
var options = '<option value="0">请选择推广员</option>'
for (var i in response.data.promotes) {
var promote = response.data.promotes[i]
options += '<option value="' + promote.id + '">' + promote.account + '</option>'
}
$('#promote-select').html(options)
}
})
}
})
}) })
</script> </script>
</block> </block>
Loading…
Cancel
Save