正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
| @@ -48,7 +48,9 @@ class AiBlogController extends BaseController | @@ -48,7 +48,9 @@ class AiBlogController extends BaseController | ||
| 48 | 'id.required' => '主键不能为空', | 48 | 'id.required' => '主键不能为空', |
| 49 | ]); | 49 | ]); |
| 50 | $info = $aiBlog->read(['id'=>$this->param['id']]); | 50 | $info = $aiBlog->read(['id'=>$this->param['id']]); |
| 51 | - $info['anchor'] = json_decode($info['anchor'] ?? [],true); | 51 | + if(!empty($info['anchor'])){ |
| 52 | + $info['anchor'] = json_decode($info['anchor'],true); | ||
| 53 | + } | ||
| 52 | $info['image'] = getImageUrl($info['image']); | 54 | $info['image'] = getImageUrl($info['image']); |
| 53 | $this->response('success',Code::SUCCESS,$info); | 55 | $this->response('success',Code::SUCCESS,$info); |
| 54 | } | 56 | } |
-
请 注册 或 登录 后发表评论