...
|
...
|
@@ -82,10 +82,22 @@ class CoaController extends AdminBaseController{ |
|
|
//编辑数据
|
|
|
public function edit(){
|
|
|
|
|
|
$data = $this->request->param();
|
|
|
if($this->request->isPost()){
|
|
|
dump(1111);die;
|
|
|
$shuju1['title'] = $data['post']['post_title'];
|
|
|
$shuju1['content'] = $data['post']['post_content'];
|
|
|
$shuju1['fenlei'] = $data['post']['post_leibie'];
|
|
|
$shuju1['post_id'] = $data['post']['post_id'];
|
|
|
$res = Db::name('docu_coa') -> where('id',$data['post']['id']) -> update($shuju1);
|
|
|
if($res){
|
|
|
$this -> success('添加成功',url('Coa/list',array('id'=>$shuju1['post_id'])));
|
|
|
}else{
|
|
|
$this -> error('添加失败');
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
$data = $this->request->param();
|
|
|
|
|
|
$this -> assign('data',$data);
|
|
|
$shuju = Db::name('docu_coa') -> where('id',$data['id']) -> find();
|
|
|
$shuju['content'] = cmf_replace_content_file_url(htmlspecialchars_decode($shuju['content']));
|
...
|
...
|
|