getRow(); $device = new DeviceServer(); // $s = request('runningStatus'); // if ($row['runningStatus'] != $s) // $device->switchDevice($row['iot_id'],$s); // $s = request('deliver_lock_switch'); // if ($row['deliver_lock_switch'] != $s) // $device->doorInOperation($row['iot_id'],$s); // $s = request('lock_switch'); // if ($row['lock_switch'] != $s) // $device->doorInOperation($row['iot_id'],$s); return $this->response()->info('操作成功')->refresh(); } public function form() { $row = $this->getRow(); // $s = 1; // if ($row['runningStatus'] == DeviceInfo::DISABLE) // $s = 0; // $this->radio('runningStatus', '锁定设备')->options(['打开','关闭'])->default($s); // $s = 1; // if ($row['deliver_lock_switch'] == 0) // $s = 0; // $this->radio('deliver_lock_switch', '投递门状态')->options(['打开','关闭'])->default($s); // $s = 1; // if ($row['lock_switch'] == 0) // $s = 0; // $this->radio('lock_switch', '收运门状态')->options(['打开','关闭'])->default($s); $this->html("
设备开关不会影响真实数据,只做临时调试用。不能用来收运,不能用来收运,不能用来收运,否者会导致后台账目混乱,并且称读数也不会清零!
",'提示:'); // $this->H("
启用 禁用
",'设备:'); // $this->H("
打开
",'收运门:'); // $this->H("
打开 关闭
",'投递门:'); } }