Browse Source

[更新]修改微信网页授权

邹景立 8 years ago
parent
commit
c68f970527
1 changed files with 1 additions and 4 deletions
  1. 1 4
      extend/controller/BasicWechat.php

+ 1 - 4
extend/controller/BasicWechat.php

@@ -93,10 +93,7 @@ class BasicWechat extends Controller {
             exit("微信网页授权失败,{$wechat->errMsg}[{$wechat->errCode}]");
         }
         session('openid', $this->openid = $result['openid']);
-        if ($fullMode) {
-            return $this->openid;
-        }
-        $this->redirect($redirect_url);
+        !$fullMode && $this->redirect($redirect_url);
         // 微信粉丝信息处理
         $this->fansinfo = WechatService::getFansInfo($this->openid);
         if (empty($this->fansinfo['expires_in']) || $this->fansinfo['expires_in'] < time()) {