|
@@ -23,11 +23,16 @@ use think\App;class CatPlat extends Base{
|
|
|
if($plat_id==""){
|
|
|
return error_show(1004,"参数 plat_id 不能为空");
|
|
|
}
|
|
|
+
|
|
|
$platform = Db::name("platform")->where(["id"=>$plat_id,"is_del"=>0])->find();
|
|
|
if($platform==false){
|
|
|
return error_show(1004,"平台信息不存在");
|
|
|
}
|
|
|
if ($platform['platform_type']!=1) return error_show(1004,"平台为非对接平台");
|
|
|
+ $ist = Db::name("cat_plat")->where([["cat_id","=",$catid],["platform_id","=",$plat_id],["is_del","=",0]])->find();
|
|
|
+ if($ist!=false){
|
|
|
+ return error_show(1004,"该平台下已存在此分类");
|
|
|
+ }
|
|
|
$rate =isset($post['rate'])&&$post['rate']!=="" ? floor($post['rate']):"";
|
|
|
if($rate==""){
|
|
|
return error_show(1004,"参数 rate 不能为空");
|