From 934ca70bac3d884718f885a3903bb11c814d2738 Mon Sep 17 00:00:00 2001 From: wangzhi <wangzhi@bronet.cn> Date: Sat, 18 Jul 2020 15:58:18 +0800 Subject: [PATCH] 222 --- application/api/controller/Index.php | 4 ++++ application/common/controller/Api.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/application/api/controller/Index.php b/application/api/controller/Index.php index 619bbc1..beb34b3 100644 --- a/application/api/controller/Index.php +++ b/application/api/controller/Index.php @@ -777,6 +777,10 @@ class Index extends Api */ public function ClassificationOnTheLeftSideOfTheHomePage() { +// $user_id = $this->is_token($this->request->header()); + $user_id=$this->request->header(); + dump($user_id); + die; $class_a = Db::name('classa')->select(); foreach ($class_a as $k => $v) { $first_list[$k]['id']=$v['id']; diff --git a/application/common/controller/Api.php b/application/common/controller/Api.php index 6e96fdb..a0a5cf5 100644 --- a/application/common/controller/Api.php +++ b/application/common/controller/Api.php @@ -329,7 +329,7 @@ class Api */ protected function is_token($token) { - if (empty($token['Authorization'])) { + if (empty($token['authorization'])) { $this->error('请登录后在操作'); } $is_token = Db::name('user')->where(['token' => $token['token']])->find(); -- libgit2 0.24.0