重写index()获取数据方式改为调用模型获取数据列表方法

pull/83/head
yhf320 2018-11-07 10:31:58 +08:00
parent f25a45e1d3
commit 271932f35a
1 changed files with 0 additions and 14 deletions

View File

@ -105,19 +105,6 @@ class Admin extends Backend
'extra_where' => ['IN',$this->childrenAdminIds]
];
$list = $this->model->getAdminList($params);
/* $total = $this->model
->where($where)
->where('id', 'in', $this->childrenAdminIds)
->order($sort, $order)
->count();
$list = $this->model
->where($where)
->where('id', 'in', $this->childrenAdminIds)
->field(['password', 'salt', 'token'], true)
->order($sort, $order)
->limit($offset, $limit)
->select(); */
foreach ($list['rows'] as $k => &$v)
{
$groups = isset($adminGroupName[$v['id']]) ? $adminGroupName[$v['id']] : [];
@ -125,7 +112,6 @@ class Admin extends Backend
$v['groups_text'] = implode(',', array_values($groups));
}
unset($v);
//$result = array("total" => $total, "rows" => $list);
return json($list);
}