|
@@ -11,6 +11,7 @@ namespace app\portal\controller; |
|
@@ -11,6 +11,7 @@ namespace app\portal\controller; |
11
|
|
11
|
|
12
|
use app\portal\model\UsersModel;
|
12
|
use app\portal\model\UsersModel;
|
13
|
use cmf\controller\AdminBaseController;
|
13
|
use cmf\controller\AdminBaseController;
|
|
|
14
|
+use think\Db;
|
14
|
/**
|
15
|
/**
|
15
|
* Class AdminUsersController
|
16
|
* Class AdminUsersController
|
16
|
* @package app\portal\controller
|
17
|
* @package app\portal\controller
|
|
@@ -33,7 +34,12 @@ class AdminUsersController extends AdminBaseController{ |
|
@@ -33,7 +34,12 @@ class AdminUsersController extends AdminBaseController{ |
33
|
$where['phone']=['like','%'.$param['keyword'].'%'];
|
34
|
$where['phone']=['like','%'.$param['keyword'].'%'];
|
34
|
}
|
35
|
}
|
35
|
$users=new UsersModel();
|
36
|
$users=new UsersModel();
|
36
|
- $data=$users->where($where)->order('create_time','desc')->paginate(10);
|
37
|
+ $data=$users->where($where)->order('create_time','desc')->paginate(10)->each(function ($item) {
|
|
|
38
|
+ if ($item['is_use']==1){
|
|
|
39
|
+ $item['eq']=Db::name('order')->where(['users_id'=>$item['id'],'status'=>1])->find()['eq_name'];
|
|
|
40
|
+ }
|
|
|
41
|
+ return $item;
|
|
|
42
|
+ });
|
37
|
$data->appends($param);
|
43
|
$data->appends($param);
|
38
|
$this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
|
44
|
$this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
|
39
|
$this->assign('data',$data);
|
45
|
$this->assign('data',$data);
|