geek 4 年之前
父節點
當前提交
e0e5ca9166
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      application/index/controller/Index.php

+ 2 - 4
application/index/controller/Index.php

@@ -10,9 +10,6 @@ namespace app\index\controller;
 use app\common\service\CommonService;
 use app\index\exception\ApiException;
 use app\index\model\UserModel;
-use app\index\model\VisitorModel;
-use think\console\command\make\Model;
-use think\facade\Cache;
 use think\facade\Session;
 
 class Index {
@@ -28,7 +25,8 @@ class Index {
         $info = (new UserModel())::where(['unionid' => Session::get('wxId'), 'channel_id' => $channelId])
             ->order(['id' => 'desc'])->find();
         if (empty(Session::get('wxId')) || empty($info)){
-            header("Location:".CommonService::getAuthUrl($channelId));
+            $temp = CommonService::getAuthUrl($channelId);
+            header("Location:".$temp);
             die();
         }
         $params = [