|
@@ -298,7 +298,8 @@ use think\App;class CatPlat extends Base{
|
|
|
$plat_id=isset($this->post['platform_id']) && $this->post['platform_id'] !==""? intval($this->post['platform_id']) :"";
|
|
|
if($pid!==""){
|
|
|
$where[]=["pid","=",$pid];
|
|
|
- $pcat = Db::name('cat')->where(['id'=>$pid,"is_del"=>0])->find();
|
|
|
+ if ($pid!=0){
|
|
|
+ $pcat = Db::name('cat')->where(['id'=>$pid,"is_del"=>0])->find();
|
|
|
if($pcat==false){
|
|
|
return error_show(1004,"未找到分类数据");
|
|
|
}else{
|
|
@@ -308,6 +309,8 @@ use think\App;class CatPlat extends Base{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
if($plat_id!=""){
|
|
|
$platform = Db::name("platform")->where(["id"=>$plat_id,"is_del"=>0])->find();
|