...
|
...
|
@@ -79,8 +79,9 @@ class UserController extends AdminBaseController |
|
|
public function student()
|
|
|
{
|
|
|
/**查询条件**/
|
|
|
$where = ["user_type" => 2];
|
|
|
$where = ["student_type" => 1];
|
|
|
$where=[];
|
|
|
$where['user_type'] = 2;
|
|
|
$where['student_type'] =1;
|
|
|
/**搜索条件**/
|
|
|
$user_nickname = $this->request->param('user_nickname');
|
|
|
$mobile = trim($this->request->param('mobile'));
|
...
|
...
|
@@ -96,6 +97,10 @@ class UserController extends AdminBaseController |
|
|
if ($mobile) {
|
|
|
$where['mobile'] = $mobile ;
|
|
|
}
|
|
|
|
|
|
if (empty($where)){
|
|
|
$where=1;
|
|
|
}
|
|
|
/**数据库检索**/
|
|
|
$users = Db::name('user')
|
|
|
->where($where)
|
...
|
...
|
@@ -128,7 +133,7 @@ class UserController extends AdminBaseController |
|
|
|
|
|
$res = DB::name('user')->where($datain)->find();
|
|
|
if ($res) {
|
|
|
$this->error("该手机号数据库已经存在!");
|
|
|
$res = DB::name('user')->where($datain)->delete();
|
|
|
}
|
|
|
$datain['headimgurl'] = '/upload/' . $p['headimgurl'];
|
|
|
$datain['user_nickname'] = $p['user_nickname'];
|
...
|
...
|
|