panlumeng 3 years ago
parent
commit
37f2ee6acc
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/admin/controller/Business.php

+ 3 - 3
app/admin/controller/Business.php

@@ -271,9 +271,9 @@ class Business extends BaseController
 
     }
     public function del(){
-        $id = $this->post['id'] && $this->post['id'] !=="" ? intval($this->post['id']) :"";
-        if($id===""){
-            return  error_show(1004,"参数id不能为空");
+        $id = isset($this->post['id']) && $this->post['id'] !=="" ? intval($this->post['id']) :"";
+        if($id==""){
+            return error_show(1002,"参数id不能为空");
         }
         $str= Db::name('business')->where(['id'=>$id,'is_del'=>0])->find();
         if(empty($str)){