123456789101112131415 |
- //添加
- public function add()
- {
- $post = CommonFun::filterPostData($this->request->post());{%validate%}{%adminUserId%}{%uploadDomainFields%}{%unsetFields%}
- try {
- if ($this->model->create($post)) {
- return $this->success('添加成功', $post);
- } else {
- return $this->error('操作失败');
- }
- } catch (\Exception $e) {
- return $this->exceptionError($e);
- }
- }
|