From cffde2e5e8dbf7c49f2a5132f86912bcf6345993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Mon, 17 Apr 2017 14:44:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E7=BD=91=E9=A1=B5=E6=8E=88=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/controller/BasicWechat.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extend/controller/BasicWechat.php b/extend/controller/BasicWechat.php index a241991b5..775a8d635 100644 --- a/extend/controller/BasicWechat.php +++ b/extend/controller/BasicWechat.php @@ -68,7 +68,7 @@ class BasicWechat extends Controller { session('openid', 'o38gps3vNdCqaggFfrBRCRikwlWY'); } // 检查缓存中 openid 信息是否完整 - if ($this->openid = session('openid')) { + if (($this->openid = session('openid'))) { if (!$fullMode) { return $this->openid; } @@ -93,8 +93,9 @@ class BasicWechat extends Controller { exit("微信网页授权失败,{$wechat->errMsg}[{$wechat->errCode}]"); } session('openid', $this->openid = $result['openid']); - eixt($redirect_url); - !$fullMode && $this->redirect($redirect_url); + if (!$fullMode) { + $this->redirect($redirect_url); + } // 微信粉丝信息处理 $this->fansinfo = WechatService::getFansInfo($this->openid); if (empty($this->fansinfo['expires_in']) || $this->fansinfo['expires_in'] < time()) {