|
...
|
...
|
@@ -40,9 +40,10 @@ class CNoticeController extends BaseController |
|
|
|
if (FALSE == in_array($type, [UpdateNotify::PAGE_ALL, UpdateNotify::PAGE_SINGLE])){
|
|
|
|
$this->response('非法参数!', Code::USER_ERROR);
|
|
|
|
}
|
|
|
|
$list = $this->sendNotifyMessage($type,$page);
|
|
|
|
if(!empty($list)){
|
|
|
|
$this->response('当前页面正在生成了,请完成后再点击',Code::USER_ERROR,$list);
|
|
|
|
$data = $this->sendNotifyMessage($type,$page);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
if(!empty($data)){
|
|
|
|
$this->response('当前页面正在生成了,请完成后再点击',Code::USER_ERROR,$data);
|
|
|
|
}
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
...
|
...
|
@@ -73,7 +74,7 @@ class CNoticeController extends BaseController |
|
|
|
if($count == 0){
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
$this->addProgress($count,$type);
|
|
|
|
// $this->addProgress($count,$type);
|
|
|
|
$updateNotifyModel->edit([$field => 1], ['project_id' => $this->user['project_id'], $field => 0]);
|
|
|
|
$urlStr = $this->getString($type,$page);
|
|
|
|
$this->curlGet($urlStr);
|
|
...
|
...
|
@@ -119,7 +120,7 @@ class CNoticeController extends BaseController |
|
|
|
'created_at'=>date('Y-m-d H;i:s')
|
|
|
|
];
|
|
|
|
$updateProgressModel = new UpdateProgress();
|
|
|
|
$updateProgressModel->insert($data);
|
|
|
|
return $updateProgressModel->insert($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|