正在显示
1 个修改的文件
包含
9 行增加
和
2 行删除
| @@ -77,6 +77,9 @@ class SuppliersController extends BaseController | @@ -77,6 +77,9 @@ class SuppliersController extends BaseController | ||
| 77 | if(isset($res['status_code']) && $res['status_code'] != 200){ | 77 | if(isset($res['status_code']) && $res['status_code'] != 200){ |
| 78 | $this->response($res['message'],Code::SYSTEM_ERROR); | 78 | $this->response($res['message'],Code::SYSTEM_ERROR); |
| 79 | } | 79 | } |
| 80 | + if(isset($res['data']['image']) && !empty($res['data']['image'])){ | ||
| 81 | + $res['data']['image'] = str_replace('admin.hagro.cn','fob.ai.cc',$res['data']['image']??''); | ||
| 82 | + } | ||
| 80 | return $this->success($res['data'] ?? []); | 83 | return $this->success($res['data'] ?? []); |
| 81 | } | 84 | } |
| 82 | /** | 85 | /** |
| @@ -134,8 +137,12 @@ class SuppliersController extends BaseController | @@ -134,8 +137,12 @@ class SuppliersController extends BaseController | ||
| 134 | if(isset($this->param['position'])){ | 137 | if(isset($this->param['position'])){ |
| 135 | $param['position'] = $this->param['position']; | 138 | $param['position'] = $this->param['position']; |
| 136 | } | 139 | } |
| 137 | - $res = $this->_action($api_url,$action_name,$param); | ||
| 138 | - $this->response('success',Code::SUCCESS,$res); | 140 | + try { |
| 141 | + $res = $this->_action($api_url,$action_name,$param); | ||
| 142 | + $this->response('success',Code::SUCCESS,$res); | ||
| 143 | + }catch (\Exception $e){ | ||
| 144 | + $this->fail('请求失败,请联系管理员'); | ||
| 145 | + } | ||
| 139 | } | 146 | } |
| 140 | 147 | ||
| 141 | /** | 148 | /** |
-
请 注册 或 登录 后发表评论