作者 anyv
1 个管道 的构建 通过 耗费 0 秒

产品

... ... @@ -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']));
... ...
... ... @@ -73,7 +73,7 @@
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
<button type="submit" class="btn btn-primary js-ajax-submit">提交</button>
</div>
</div>
... ...