wugg 2 years ago
parent
commit
d98fa2c77e
1 changed files with 6 additions and 6 deletions
  1. 6 6
      app/admin/controller/CatPlat.php

+ 6 - 6
app/admin/controller/CatPlat.php

@@ -308,17 +308,17 @@ use think\App;class CatPlat extends Base{
                 $pcat =  Db::name('cat')->where(['id'=>$pid,"is_del"=>0])->find();
                 if($pcat==false){
                     return error_show(1004,"未找到分类数据");
-                }else{
-                    if($pcat['level']==2){
-                        if($plat_id==""){
-                            return error_show(1004,"参数 platform_id 不能为空");
-                        }
-                    }
+                }
+                if($plat_id==''){
+                    return error_show(1004,"参数 platform_id 不能为空");
                 }
             }
         }
         if($plat_id!=""){
               $platform = Db::name("platform")->where(["id"=>$plat_id,"is_del"=>0])->find();
+              if($platform==false){
+                  return error_show(1004,"未找到平台数据");
+              }
         }
         $status=isset($this->post['status']) && $this->post['status'] !==""? intval($this->post['status']) :"";
         if($status!==""){