正在显示
1 个修改的文件
包含
8 行增加
和
3 行删除
| @@ -143,9 +143,14 @@ class AyrShareController extends BaseController | @@ -143,9 +143,14 @@ class AyrShareController extends BaseController | ||
| 143 | $data = [ | 143 | $data = [ |
| 144 | 'profileKey'=>$info['profile_key'] | 144 | 'profileKey'=>$info['profile_key'] |
| 145 | ]; | 145 | ]; |
| 146 | - $res = $ayrShareHelper->post_generate_jwt($data); | ||
| 147 | - if($res['status'] == 'fail'){ | ||
| 148 | - $this->response($res['message'],Code::USER_ERROR); | 146 | + try { |
| 147 | + $res = $ayrShareHelper->post_generate_jwt($data); | ||
| 148 | + if($res['status'] == 'fail'){ | ||
| 149 | + $this->response($res['message'],Code::USER_ERROR); | ||
| 150 | + } | ||
| 151 | + }catch (\Exception $e){ | ||
| 152 | + $ayrShareLogic->ayr_share_edit(['profile_key'=>null,'bind_platforms'=>null,'ref_id'=>null],['id'=>$info['id']]); | ||
| 153 | + $this->response('当前key值已过期,请刷新重新绑定',Code::USER_ERROR); | ||
| 149 | } | 154 | } |
| 150 | $this->response('success',Code::SUCCESS,$res); | 155 | $this->response('success',Code::SUCCESS,$res); |
| 151 | } | 156 | } |
-
请 注册 或 登录 后发表评论