wugg 3 yıl önce
ebeveyn
işleme
e774a71dec
1 değiştirilmiş dosya ile 9 ekleme ve 8 silme
  1. 9 8
      app/admin/controller/Good.php

+ 9 - 8
app/admin/controller/Good.php

@@ -31,14 +31,14 @@ class Good extends \app\BaseController
         {
             parent::__construct($app);
             $this->post = $this->request->post();
-//            $token = isset($this->post['token']) ? trim($this->post['token']) : "";
-//            if($token==""){
-//                return error_show(101,'token不能为空');
-//            }
-//            $effetc = VerifyTokens($token);
-//            if(!empty($effetc) && $effetc['code']!=0){
-//                return error_show($effetc['code'],$effetc['message']);
-//            }
+            $token = isset($this->post['token']) ? trim($this->post['token']) : "";
+            if($token==""){
+                return error_show(101,'token不能为空');
+            }
+            $effetc = VerifyTokens($token);
+            if(!empty($effetc) && $effetc['code']!=0){
+                return error_show($effetc['code'],$effetc['message']);
+            }
         }
 
     public function list(){
@@ -73,6 +73,7 @@ class Good extends \app\BaseController
         foreach ($list as $value){
             $value['cat_info']= made($value['cat_id'],[]);
             $data[]=$value;
+
         }
         return app_show(0,"获取成功",['list'=>$data,'count'=>$count]);
     }