dataLists(new SceneLists()); } /** * @notes 添加 * @author L * @date 2024-07-02 16:25:03 */ public function add():Json { $params = (new SceneValidate())->post()->goCheck('add'); return SceneLogic::add($params) ? $this->success(data: SceneLogic::getReturnData()) : $this->fail(SceneLogic::getError()); } /** * @notes 删除 * @return Json * @author L * @date 2024-07-02 16:25:03 */ public function delete():Json { $params = $this->request->post(); return SceneLogic::delete($params) ? $this->success() : $this->fail(SceneLogic::getError()); } /** * @notes 详情 * @return Json * @author L * @date 2024-07-02 16:25:03 */ public function detail():Json { $id = $this->request->get('id/d'); if (empty($id)) { return $this->fail('参数丢失'); } $result = SceneLogic::detail($id); return $this->data(SceneLogic::getReturnData()); } /** * @notes 修改 * @return Json * @author L * @date 2024-07-02 16:25:03 */ public function edit():Json { $postData = (new SceneValidate())->post()->goCheck('edit'); $edit = SceneLogic::edit($postData); return $edit ? $this->success() : $this->fail(SceneLogic::getError()); } /** * 修改状态的 * @return Json * @author L * @data 2024/7/2 15:12 */ public function changeStatus():Json { $id = $this->request->post('id/d'); if (empty($id)) { return $this->fail("参数丢失"); } return SceneLogic::changeStatus($id) ? $this->success() : $this->fail(SceneLogic::getError()); } }