input('platform_token'); $this->platform = Platform::where('token', $platform_token)->first(); log_i($platform_token, 'token', 'sync'); if (!$this->platform) { log_i($platform_token . ' 未找到', 'token', 'sync'); json_error('通讯错误'); } if ($this->platform->status != Platform::STATUS_PASS) { log_i($platform_token . ' 无权限', 'token', 'sync'); json_error('无权限'); } $type = $request->input('type'); if (method_exists($this, $type)) { log_i($platform_token . ' 开始执行:' . $type, 'token', 'sync'); log_i(json_encode(request()->all()), $type, 'sync'); $this->{$type}(); } else { log_i($platform_token . '同步数据错误 ' . $type, 'token', 'sync'); json_error('同步数据错误 ' . $type); } } private function prescriptionSync() { $data = request('data'); } }