Update Push.php

This commit is contained in:
Anyon 2019-12-14 17:23:09 +08:00
parent b176423eff
commit 6e90f242e1

View File

@ -118,7 +118,7 @@ class Push extends Controller
if (is_string(($result = $this->$method()))) return $result; if (is_string(($result = $this->$method()))) return $result;
} }
} catch (\Exception $e) { } catch (\Exception $e) {
sysoplog('微信接口', "{$e->getFile()}:{$e->getLine()} [{$e->getCode()}] {$e->getMessage()}"); $this->app->log->error("{$e->getFile()}:{$e->getLine()} [{$e->getCode()}] {$e->getMessage()}");
} }
return 'success'; return 'success';
} }
@ -320,7 +320,7 @@ class Push extends Controller
$user = WechatService::WeChatUser()->getUserInfo($this->openid); $user = WechatService::WeChatUser()->getUserInfo($this->openid);
return FansService::instance()->set(array_merge($user, ['subscribe' => '1', 'appid' => $this->appid])); return FansService::instance()->set(array_merge($user, ['subscribe' => '1', 'appid' => $this->appid]));
} catch (\Exception $e) { } catch (\Exception $e) {
sysoplog('微信接口', __METHOD__ . " {$this->openid} get userinfo faild. {$e->getMessage()}"); $this->app->log->error(__METHOD__ . " {$this->openid} get userinfo faild. {$e->getMessage()}");
return false; return false;
} }
} else { } else {