dataLists(new ActivityZoneFormLists()); } /** * @notes 添加 * @return \think\response\Json * @author admin * @date 2024/12/20 10:52 */ public function add() { $params = (new ActivityZoneFormValidate())->post()->goCheck('add'); $result = ActivityZoneFormLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(ActivityZoneFormLogic::getError()); } /** * @notes 编辑 * @return \think\response\Json * @author admin * @date 2024/12/20 10:52 */ public function edit() { $params = (new ActivityZoneFormValidate())->post()->goCheck('edit'); $result = ActivityZoneFormLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(ActivityZoneFormLogic::getError()); } /** * @notes 删除 * @return \think\response\Json * @author admin * @date 2024/12/20 10:52 */ public function delete() { $params = (new ActivityZoneFormValidate())->post()->goCheck('delete'); ActivityZoneFormLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取详情 * @return \think\response\Json * @author admin * @date 2024/12/20 10:52 */ public function detail() { $params = (new ActivityZoneFormValidate())->goCheck('detail'); $result = ActivityZoneFormLogic::detail($params); return $this->data($result); } public function export() { $params = $this->request->get(); $file_path = ActivityZoneFormLogic::export($params); return $this->success('导出成功', ['url' => $file_path]); } }