更新后台用户管理
This commit is contained in:
parent
bde85d8244
commit
034307d311
@ -6,6 +6,7 @@ use app\admin\BaseController;
|
||||
use think\facade\View;
|
||||
use think\facade\Db;
|
||||
|
||||
use app\admin\model\ShopUser;
|
||||
use app\admin\model\InformationUserMsg;
|
||||
|
||||
/**
|
||||
@ -81,6 +82,7 @@ class User extends BaseController
|
||||
$mmm['brigade_id'] = $post['brigade_id'];
|
||||
}
|
||||
}
|
||||
|
||||
//权限组信息
|
||||
$total = InformationUserMsg::alias('m')
|
||||
->where($mmm)
|
||||
@ -91,13 +93,14 @@ class User extends BaseController
|
||||
->where($mmm)
|
||||
->where($map)
|
||||
// ->join(['shop.eb_user' => 'u'], 'm.user_id=u.uid')u.avatar,u.group_id,u.status,
|
||||
->field('m.user_id id,m.name,m.phone,m.gender,m.age,m.householder_id,m.user_id')
|
||||
->withAttr('shop_info', function ($value, $data) {
|
||||
$find=Db::connect('shop')->name('user')->where('uid',$data['user_id'])->field('uid,avatar,status,group_id')->find();
|
||||
if (!$find) return false;
|
||||
$find['group_name']=Db::connect('shop')->name('user_group')->where('group_id',$find['group_id'])->value('group_name');
|
||||
return $find;
|
||||
})
|
||||
->with(['user.userGroup'])
|
||||
// ->field('m.user_id id,m.name,m.phone,m.gender,m.age,m.householder_id,m.user_id')
|
||||
// ->withAttr('shop_info', function ($value, $data) {
|
||||
// $find=Db::connect('shop')->name('user')->where('uid',$data['user_id'])->field('uid,avatar,status,group_id')->find();
|
||||
// if (!$find) return false;
|
||||
// $find['group_name']=Db::connect('shop')->name('user_group')->where('group_id',$find['group_id'])->value('group_name');
|
||||
// return $find;
|
||||
// })
|
||||
->withAttr('count', function ($value, $data) {
|
||||
if ($data['householder_id'] != 0) {
|
||||
$count = Db::table('fa_szxc_information_usermsg')->where('householder_id', $data['householder_id'])->count();
|
||||
|
@ -151,7 +151,7 @@
|
||||
},{
|
||||
field: 'group_name',
|
||||
title: '角色组',
|
||||
templet: '<div>{{ d.shop_info.group_name }}</div>',
|
||||
templet: '<div>{{ d.user.userGroup.group_name }}</div>',
|
||||
|
||||
},{
|
||||
field: 'name',
|
||||
@ -165,7 +165,7 @@
|
||||
field: 'user',
|
||||
title: '头像',
|
||||
align: 'center',
|
||||
templet: '<div><img src="{{ d.shop_info.avatar }}" style="width:30px; height:30px;"></div>',
|
||||
templet: '<div><img src="{{ d.user.avatar }}" style="width:30px; height:30px;"></div>',
|
||||
},{
|
||||
field: 'gender',
|
||||
title: '性别',
|
||||
|
Loading…
x
Reference in New Issue
Block a user