|
...
|
...
|
@@ -60,16 +60,14 @@ class GeneratePage extends Command |
|
|
|
$this->output(' taskID: ' . $noticeInfo['id'] . ' start');
|
|
|
|
$c_url = $noticeInfo['data']['c_url'];
|
|
|
|
$c_params = $noticeInfo['data']['c_params'];
|
|
|
|
try {
|
|
|
|
$re = http_post($c_url, $c_params, [], true);
|
|
|
|
if (isset($re['status']) && $re['status'] == 200) {
|
|
|
|
$noticeModel->edit(['status'=>1],['id'=>$noticeInfo['id']]);
|
|
|
|
$this->output($c_url . ' | 请求成功');
|
|
|
|
} else {
|
|
|
|
$noticeModel->edit(['status'=>2],['id'=>$noticeInfo['id']]);
|
|
|
|
$this->output($c_url . ' | ' . ($re['message'] ?? '未返回失败原因'));
|
|
|
|
}
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
$this->output($c_url . ' | 请求异常:' . $e->getMessage());
|
|
|
|
}
|
|
|
|
$this->output(' taskID: ' . $noticeInfo['id'] . ' end');
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
$this->output(' taskID: ' . $noticeInfo['id'] . ', error: ' . $e->getMessage());
|
...
|
...
|
|