model = new \app\common\model\UserWelfare; } /** * 查看 */ public function index() { $row = $this->model->get(1); if ($this->request->isPost()) { $params = $this->request->post("row/a"); $result = $row->allowField(true)->save($params); $this->success("提交成功", null, ['data' => json_encode($this->request->post("row/a"), JSON_UNESCAPED_UNICODE)]); } $this->view->assign('row', $row); return $this->view->fetch(); } }