model = new FengsuShipModel(); } //查看 #[Route("GET,JSON","index")] public function index() { return $this->_index(); } //添加 #[Route("GET,POST","add")] public function add() { //通过定义postParams来增加或覆盖post提交的表单 $this->postParams=[]; //通过定义callback回调函数来执行添加后的操作 $this->callback=function ($model){}; return $this->_add(); } //修改 #[Route("GET,POST","edit")] public function edit() { //通过定义postParams来增加或覆盖post提交的表单 $this->postParams=[]; //通过定义callback回调函数来执行修改后的操作 $this->callback=function ($model){}; return $this->_edit(); } //删除 #[Route("GET,POST","del")] public function del() { //通过定义callback回调函数来执行删除后的操作 $this->callback=function ($ids){}; return $this->_del(); } //更新 #[Route("GET,POST","multi")] public function multi() { //通过定义callback回调函数来执行更新后的操作 $this->callback=function ($ids,$field,$value){}; return $this->_multi(); } }