作者 wangzhi

222

@@ -777,6 +777,10 @@ class Index extends Api @@ -777,6 +777,10 @@ class Index extends Api
777 */ 777 */
778 public function ClassificationOnTheLeftSideOfTheHomePage() 778 public function ClassificationOnTheLeftSideOfTheHomePage()
779 { 779 {
  780 +// $user_id = $this->is_token($this->request->header());
  781 + $user_id=$this->request->header();
  782 + dump($user_id);
  783 + die;
780 $class_a = Db::name('classa')->select(); 784 $class_a = Db::name('classa')->select();
781 foreach ($class_a as $k => $v) { 785 foreach ($class_a as $k => $v) {
782 $first_list[$k]['id']=$v['id']; 786 $first_list[$k]['id']=$v['id'];
@@ -329,7 +329,7 @@ class Api @@ -329,7 +329,7 @@ class Api
329 */ 329 */
330 protected function is_token($token) 330 protected function is_token($token)
331 { 331 {
332 - if (empty($token['Authorization'])) { 332 + if (empty($token['authorization'])) {
333 $this->error('请登录后在操作'); 333 $this->error('请登录后在操作');
334 } 334 }
335 $is_token = Db::name('user')->where(['token' => $token['token']])->find(); 335 $is_token = Db::name('user')->where(['token' => $token['token']])->find();