ソースを参照

feat():授权

geek 4 年 前
コミット
eef72556c8
共有2 個のファイルを変更した2 個の追加6 個の削除を含む
  1. 0 5
      application/index/BaseController.php
  2. 2 1
      application/index/controller/Index.php

+ 0 - 5
application/index/BaseController.php

@@ -71,11 +71,6 @@ abstract class BaseController
 //            $decodeToken = $token->decodeToken();
 //            $this->userId = $decodeToken['userId'];
         }
-        Session::init([
-            'prefix'         => '',
-            'type'           => '',
-            'auto_start'     => true,
-        ]);
         // 控制器初始化
         $this->initialize();
     }

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

@@ -8,6 +8,7 @@ namespace app\index\controller;
 
 
 use app\common\service\CommonService;
+use think\facade\Session;
 
 class Index {
 
@@ -15,7 +16,7 @@ class Index {
         $visitorId = input('visitorId');
         $notifyUrl = input('notify_url');
         var_dump(input());
-        var_dump($_SESSION);
+        var_dump(Session::instance());
         die();
         if (empty(session('unionid'))){
             header("Location:".CommonService::getAuthUrl());