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

修复检索问题
master
廖金灵 5 years ago committed by Gogs
commit 43562f6746

@ -1210,6 +1210,7 @@ class StatisticsController extends ThinkController {
} }
$promoters = M('promote', 'tab_')->field('id, account')->where(array_merge(['level'=>$level], $pid ? ['parent_id'=>$pid] : []))->select(); $promoters = M('promote', 'tab_')->field('id, account')->where(array_merge(['level'=>$level], $pid ? ['parent_id'=>$pid] : []))->select();
unset($typeArr[0]);
$this->assign('promoters', $promoters); $this->assign('promoters', $promoters);
$this->assign('types', $typeArr); $this->assign('types', $typeArr);
$this->assign('level_desc', PromoteModel::$levelArr[$level]); $this->assign('level_desc', PromoteModel::$levelArr[$level]);
@ -1320,6 +1321,7 @@ class StatisticsController extends ThinkController {
$this->assign('_page', $page); $this->assign('_page', $page);
} }
unset($typeArr[0]);
$this->assign('parents', $parents); $this->assign('parents', $parents);
$this->assign('presidents', M('promote', 'tab_')->where(['level'=>1])->select()); $this->assign('presidents', M('promote', 'tab_')->where(['level'=>1])->select());
$this->assign('types', $typeArr); $this->assign('types', $typeArr);

@ -286,7 +286,8 @@
success:function(response){ success:function(response){
var html = "<option value='' selected>"+text+"</option>"; var html = "<option value='' selected>"+text+"</option>";
$.each(response.data, function(index, item){ $.each(response.data, function(index, item){
if (parentIds[level] && parentIds[level] == item.id) { console.log(parentIds);
if (parentIds != null && parentIds[level] == item.id) {
html += "<option value='"+item.id+"' selected >"+item.account+"</option>"; html += "<option value='"+item.id+"' selected >"+item.account+"</option>";
} else { } else {
html += "<option value='"+item.id+"'>"+item.account+"</option>"; html += "<option value='"+item.id+"'>"+item.account+"</option>";

Loading…
Cancel
Save