decode($body); // self::dd($data); return $this->response(); } /** * 状态响应 * @param $login_type * @return array * User: Mead */ public function response($login_type = '00') { $body = [ '5b', '0000' ]; return $body; } /** * 解析装载的状态消息 * @param $body * @return array * User: Mead */ private function decode($body) { $i = 0; $box_time = self::stitching($body, $i, 4); $i += 4; $imei = substr(self::stitching($body, $i, 8), 0, -1); // i=4 return [ 'box_time' => $this->decodeTime($box_time), 'imei' => $imei ]; } }