$t['id'], // 'device' => $t['device'], // 'ets' => $t['ets'], // 'benchmark' => $t['benchmark'], // 'time' => $t['time'], // 'ts' => $t['ts'], // 'ua' => $t['ua'], // ]; } protected static function formatR(array $r): array { return $r; } /** * 获取关注Up动态 * @return mixed */ public static function heartBeat(string $url, array $t, array $r): array { $headers = [ 'Content-Type' => 'application/json', ]; // 加密部分 $payload = [ 't' => static::formatT($t), 'r' => static::formatR($r) ]; return Request::putJson(true, 'other', $url, $payload, $headers); } }