|
@@ -8,7 +8,7 @@ use think\Db;
|
|
|
|
|
|
class System extends Base
|
|
|
{
|
|
|
- protected $role = ["0" => '系统', "1" => "超级管理员", "2" => "管理员", "3" => "用户"];
|
|
|
+ protected $role = ["0" => '系统', "1" => "超级管理员", "2" => "运营", "3" => "用户","4"=>'库管','5'=>"管理员"];
|
|
|
protected $menu = [];
|
|
|
protected $action = [];
|
|
|
|
|
@@ -17,34 +17,37 @@ class System extends Base
|
|
|
parent::__construct();
|
|
|
$this->menu = [
|
|
|
"login" => ["label" => "后台登录模块", "action" => []],
|
|
|
+ "homelogin" => ["label" => "用户登录模块", "action" => []],
|
|
|
"menu" => ["label" => "菜单管理模块", "action" => [
|
|
|
- ['value'=>"add","label"=>'新建'],
|
|
|
- ['value'=>"edit","label"=>'编辑'],
|
|
|
- ['value'=>"status","label"=>'状态'],
|
|
|
- ['value'=>"del","label"=>'删除'],
|
|
|
+// ['value'=>"add","label"=>'新建'],
|
|
|
+// ['value'=>"edit","label"=>'编辑'],
|
|
|
+// ['value'=>"status","label"=>'状态'],
|
|
|
+// ['value'=>"del","label"=>'删除'],
|
|
|
]],
|
|
|
"menuaction" => ["label" => "菜单功能模块", "action" => [
|
|
|
- ['value'=>"add","label"=>'新建'],
|
|
|
- ['value'=>"edit","label"=>'编辑'],
|
|
|
- ['value'=>"status","label"=>'状态'],
|
|
|
- ['value'=>"del","label"=>'删除']]],
|
|
|
+// ['value'=>"add","label"=>'新建'],
|
|
|
+// ['value'=>"edit","label"=>'编辑'],
|
|
|
+// ['value'=>"status","label"=>'状态'],
|
|
|
+// ['value'=>"del","label"=>'删除']
|
|
|
+ ]
|
|
|
+ ],
|
|
|
"order" => ["label" => "订单管理模块", "action" => [
|
|
|
- ['value'=>"edit","label"=>'编辑'],
|
|
|
- ['value'=>"status","label"=>'状态']
|
|
|
+// ['value'=>"edit","label"=>'编辑'],
|
|
|
+// ['value'=>"status","label"=>'状态']
|
|
|
]],
|
|
|
"stock" => ["label" => "库存管理模块", "action" => [
|
|
|
- ['value'=>"add","label"=>'新建'],
|
|
|
- ['value'=>"edit","label"=>'编辑']
|
|
|
+// ['value'=>"add","label"=>'新建'],
|
|
|
+// ['value'=>"edit","label"=>'编辑']
|
|
|
]],
|
|
|
"account" => ["label" => "用户管理模块", "action" => [
|
|
|
- ['value'=>"add","label"=>'新建'],
|
|
|
- ['value'=>"edit","label"=>'编辑'],
|
|
|
- ['value'=>"status","label"=>'状态'],
|
|
|
- ['value'=>"del","label"=>'删除']
|
|
|
+// ['value'=>"add","label"=>'新建'],
|
|
|
+// ['value'=>"edit","label"=>'编辑'],
|
|
|
+// ['value'=>"status","label"=>'状态'],
|
|
|
+// ['value'=>"del","label"=>'删除']
|
|
|
]],
|
|
|
"version" => ["label" => "版本管理模块", "action" => [
|
|
|
- ['value'=>"add","label"=>'新建'],
|
|
|
- ['value'=>"edit","label"=>'编辑']
|
|
|
+// ['value'=>"add","label"=>'新建'],
|
|
|
+// ['value'=>"edit","label"=>'编辑']
|
|
|
]
|
|
|
]];
|
|
|
$this->action = [
|
|
@@ -62,7 +65,12 @@ class System extends Base
|
|
|
$where = [];
|
|
|
$role = isset($this->post['role']) && $this->post['role'] != "" ? $this->post['role'] : "";
|
|
|
if ($role != "") {
|
|
|
- $where['role'] = $role;
|
|
|
+ if($role==2){
|
|
|
+ $where['role'] = ['in',[2,4,5]];
|
|
|
+ }else{
|
|
|
+ $where['role'] = $role;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
$lowtime = isset($this->post['lowtime']) && $this->post['lowtime'] != "" ? $this->post['lowtime'] : "";
|
|
|
if ($lowtime != "") {
|
|
@@ -78,7 +86,7 @@ class System extends Base
|
|
|
}
|
|
|
$moudel = isset($this->post['moudel']) && $this->post['moudel'] != "" ? $this->post['moudel'] : "";
|
|
|
if ($moudel != "") {
|
|
|
- $where['moudel|action'] = ["like", "%{$moudel}%"];
|
|
|
+ $where['module|action'] =$moudel;
|
|
|
}
|
|
|
$count = Db::name("system_log")->where($where)->count();
|
|
|
$total = ceil($count / $size);
|