|
@@ -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]);
|
|
|
}
|