diff --git a/Application/Admin/Controller/StatementController.class.php b/Application/Admin/Controller/StatementController.class.php index d0730b443..4c823e9c8 100644 --- a/Application/Admin/Controller/StatementController.class.php +++ b/Application/Admin/Controller/StatementController.class.php @@ -45,6 +45,17 @@ class StatementController extends ThinkController $this->display(); } + public function delCpStatement() + { + if(!isset($_REQUEST['id'])) $this->error("参数错误"); + $id = $_REQUEST['id']; + $res = M("statement","tab_")->where("id = '{$id}'")->delete(); + if($res !== false){ + $this->ajaxReturn(array("success"=>"ok","code"=>0)); + }else{ + $this->ajaxReturn(array("error"=>"database error","code"=>2000)); + } + } //获取推广公司基础信息 public function getCpCompanyInfo() { diff --git a/Application/Admin/View/Statement/editCpStatement.html b/Application/Admin/View/Statement/editCpStatement.html index 7e26ef44c..cebc94243 100644 --- a/Application/Admin/View/Statement/editCpStatement.html +++ b/Application/Admin/View/Statement/editCpStatement.html @@ -601,11 +601,11 @@ } } console.log(DATAOBJ); - // layer.load(2); - // $("#createStatement").off("click");//自我解绑 + layer.load(2); + $("#createStatement").off("click");//自我解绑 PUBLIC.postData("{:U('doAddCpStatement',['id'=>$id])}",DATAOBJ,function(data){ - if(data.success){ + if(data.code == 0){ layer.closeAll('loading'); layer.msg('修改成功'); setTimeout(function(){ diff --git a/Application/Admin/View/StatementMangement/lists.html b/Application/Admin/View/StatementMangement/lists.html index ca7760206..28e62edde 100644 --- a/Application/Admin/View/StatementMangement/lists.html +++ b/Application/Admin/View/StatementMangement/lists.html @@ -60,8 +60,8 @@