更新后台展示
This commit is contained in:
commit
bde85d8244
@ -6,6 +6,8 @@ use app\admin\BaseController;
|
|||||||
use think\facade\View;
|
use think\facade\View;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
|
use app\admin\model\InformationUserMsg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章
|
* 文章
|
||||||
*
|
*
|
||||||
@ -46,7 +48,9 @@ class User extends BaseController
|
|||||||
}
|
}
|
||||||
//权限组信息
|
//权限组信息
|
||||||
if ($this->adminInfo['group_access'] != 1) {
|
if ($this->adminInfo['group_access'] != 1) {
|
||||||
|
|
||||||
$find = Db::table('fa_szxc_information_useraddress')->where('admin_id', $this->adminInfo['id'])->find();
|
$find = Db::table('fa_szxc_information_useraddress')->where('admin_id', $this->adminInfo['id'])->find();
|
||||||
|
|
||||||
if ($find) {
|
if ($find) {
|
||||||
if ($find['auth_range'] == 1) {
|
if ($find['auth_range'] == 1) {
|
||||||
$mmm['area_id'] = $find['area_id'];
|
$mmm['area_id'] = $find['area_id'];
|
||||||
@ -78,13 +82,12 @@ class User extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//权限组信息
|
//权限组信息
|
||||||
$total = Db::table('fa_szxc_information_usermsg')
|
$total = InformationUserMsg::alias('m')
|
||||||
->alias('m')
|
|
||||||
->where($mmm)
|
->where($mmm)
|
||||||
->where($map)
|
->where($map)
|
||||||
->count();
|
->count();
|
||||||
$list = Db::table('fa_szxc_information_usermsg')
|
|
||||||
->alias('m')
|
$list = InformationUserMsg::alias('m')
|
||||||
->where($mmm)
|
->where($mmm)
|
||||||
->where($map)
|
->where($map)
|
||||||
// ->join(['shop.eb_user' => 'u'], 'm.user_id=u.uid')u.avatar,u.group_id,u.status,
|
// ->join(['shop.eb_user' => 'u'], 'm.user_id=u.uid')u.avatar,u.group_id,u.status,
|
||||||
|
@ -19,4 +19,15 @@ class InformationUserMsg extends Model
|
|||||||
// 设置当前模型对应的完整数据表名称
|
// 设置当前模型对应的完整数据表名称
|
||||||
protected $table = 'fa_szxc_information_usermsg';
|
protected $table = 'fa_szxc_information_usermsg';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 关联用户表
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->hasOne(ShopUser::class, 'uid', 'user_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -41,4 +41,14 @@ class ShopUser extends Model
|
|||||||
{
|
{
|
||||||
return $this->hasOne(InformationUserMsg::class, 'user_id', 'uid');
|
return $this->hasOne(InformationUserMsg::class, 'user_id', 'uid');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 关联用户分组表
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function userGroup()
|
||||||
|
{
|
||||||
|
return $this->hasOne(ShopUserGroup::class, 'group_id', 'group_id');
|
||||||
|
}
|
||||||
}
|
}
|
25
app/admin/model/ShopUserGroup.php
Normal file
25
app/admin/model/ShopUserGroup.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @copyright Copyright (c) 2021 勾股工作室
|
||||||
|
* @license https://opensource.org/licenses/Apache-2.0
|
||||||
|
* @link https://www.gougucms.com
|
||||||
|
*/
|
||||||
|
namespace app\admin\model;
|
||||||
|
|
||||||
|
use think\facade\Db;
|
||||||
|
use think\model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 商城用户分组表
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class ShopUserGroup extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'shop';
|
||||||
|
|
||||||
|
// 设置当前模型对应的完整数据表名称
|
||||||
|
protected $table = 'eb_user_group';
|
||||||
|
protected $pk = 'group_id';
|
||||||
|
|
||||||
|
}
|
@ -162,7 +162,7 @@
|
|||||||
title: '手机号',
|
title: '手机号',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},{
|
},{
|
||||||
field: 'avatar',
|
field: 'user',
|
||||||
title: '头像',
|
title: '头像',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
templet: '<div><img src="{{ d.shop_info.avatar }}" style="width:30px; height:30px;"></div>',
|
templet: '<div><img src="{{ d.shop_info.avatar }}" style="width:30px; height:30px;"></div>',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user