Commit 13c84791 authored by 冯超鹏's avatar 冯超鹏

no message

parent 1c904c2a
......@@ -28,7 +28,7 @@ class SwooleCommandController extends Controller
public function chemicals($id)
{
$uid = $this->isadmin($id);
$uid = $this->parseAbilityAndArgumentsadmin($id);
$databadevice = DB::table('device');
if($uid == 1){
$devicelist = $databadevice
......@@ -64,7 +64,7 @@ class SwooleCommandController extends Controller
public function fire($id)
{
$uid = $this->isadmin($id);
$uid = $this->parseAbilityAndArgumentsadmin($id);
$databadevice = DB::table('device');
if($uid == 1){
$devicelist = $databadevice
......@@ -102,7 +102,7 @@ class SwooleCommandController extends Controller
//监测是否设备报警
public function alarm($id)
{
$uid = $this->isadmin($id);
$uid = $this->parseAbilityAndArgumentsadmin($id);
if ($uid == 1) {
$isalarm = DB::table('reportpolice')
->where('status', '=', '1')
......@@ -126,7 +126,7 @@ class SwooleCommandController extends Controller
return $this->jsonErrorData(105, '当前无报警');
}
}
public function isadmin($id)
public function parseAbilityAndArgumentsadmin($id)
{
$isadmin = DB::table('users')->where('id','=',$id)->value('isadmin');
return $isadmin;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment