uid = $uid; $this->ip = $ip; $this->ua = $ua; $this->app_id = $app_id; $this->open_id = $open_id; $this->account_id = $account_id; $this->time = $time; } /** * Execute the job. * * @return void */ public function handle() { $client = new Client(); $params = [ 'uid' => $this->uid, 'ip' => $this->ip, 'ua' => $this->ua, 'app_id' => $this->app_id, 'open_id' => $this->open_id, 'account_id' => $this->account_id, 'time' => $this->time, 'source' => 'wdy' ]; if( date('Y-m-d',strtotime( $this->time )) != date('Y-m-d')){ return ; } $params['sign'] = _sign($params, SysConsts::TIKTOK_KEY); $url = 'https://newtrackapi.zhuishuyun.com/api/user/tiktokUserPush'; $response = $client->request('post', $url, ['form_params' => $params])->getBody()->getContents(); myLog('tiktok_push_register')->info($response); $result = json_decode($response); if ($result) { if ($result->code != 0) { myLog('tiktok_push_register')->info($response); } } } }