正在显示
1 个修改的文件
包含
6 行增加
和
1 行删除
| @@ -30,7 +30,12 @@ class GoogleLinkController extends BaseController | @@ -30,7 +30,12 @@ class GoogleLinkController extends BaseController | ||
| 30 | if(empty($lists['list'])){ | 30 | if(empty($lists['list'])){ |
| 31 | $linkService = new GoogleLinkService(); | 31 | $linkService = new GoogleLinkService(); |
| 32 | $data = $linkService->linkPageData($this->user['domain'],$this->user['project_id']); | 32 | $data = $linkService->linkPageData($this->user['domain'],$this->user['project_id']); |
| 33 | - $lists = paginateArray($data,$this->page,$this->row); | 33 | + if(is_array($data)){ |
| 34 | + $lists = paginateArray($data,$this->page,$this->row); | ||
| 35 | + }else{ | ||
| 36 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND); | ||
| 37 | + $this->response('success',Code::SUCCESS,[]); | ||
| 38 | + } | ||
| 34 | } | 39 | } |
| 35 | $lists['y_total'] = $linkModel->counts(['status'=>1,'project_id'=>$this->user['project_id']]); | 40 | $lists['y_total'] = $linkModel->counts(['status'=>1,'project_id'=>$this->user['project_id']]); |
| 36 | $lists['n_total'] = $linkModel->counts(['status'=>0,'project_id'=>$this->user['project_id']]); | 41 | $lists['n_total'] = $linkModel->counts(['status'=>0,'project_id'=>$this->user['project_id']]); |
-
请 注册 或 登录 后发表评论