wesley.chen hace 7 años
padre
commit
9a0e627302

+ 1 - 0
app/Http/Controllers/Api/V1/Controller.php

xqd
@@ -26,6 +26,7 @@ class Controller extends BaseController
             ]
         ]);
 
+        dd(Auth::user());
 //        \DB::connection()->enableQueryLog();
 //        $queries = \DB::getQueryLog();
 //        dd($queries);

+ 14 - 14
app/Http/Controllers/Api/V1/HomeController.php

xqd
@@ -28,20 +28,20 @@ class HomeController extends Controller
     protected $app;
     protected $setting;
 
-    public function __construct()
-    {
-        $this->setting = SettingInfoModel::first();
-
-        $config = [
-            'app_id' => $this->setting->app_id,
-            'secret' => $this->setting->app_secret,
-
-            // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
-            'response_type' => 'array',
-        ];
-
-        $this->app = Factory::miniProgram($config);
-    }
+//    public function __construct()
+//    {
+//        $this->setting = SettingInfoModel::first();
+//
+//        $config = [
+//            'app_id' => $this->setting->app_id,
+//            'secret' => $this->setting->app_secret,
+//
+//            // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
+//            'response_type' => 'array',
+//        ];
+//
+//        $this->app = Factory::miniProgram($config);
+//    }
 
     /**
      * @api {post} /api/home/login 登陆(login)