dataLists(new FenceHouseLists()); } /** * @notes 添加 * @return \think\response\Json * @author likeadmin * @date 2024/01/10 15:15 */ public function add() { $params = (new FenceHouseValidate())->post()->goCheck('add'); $result = FenceHouseLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(FenceHouseLogic::getError()); } /** * @notes 编辑 * @return \think\response\Json * @author likeadmin * @date 2024/01/10 15:15 */ public function edit() { $params = (new FenceHouseValidate())->post()->goCheck('edit'); $result = FenceHouseLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(FenceHouseLogic::getError()); } /** * @notes 删除 * @return \think\response\Json * @author likeadmin * @date 2024/01/10 15:15 */ public function delete() { $params = (new FenceHouseValidate())->post()->goCheck('delete'); FenceHouseLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取详情 * @return \think\response\Json * @author likeadmin * @date 2024/01/10 15:15 */ public function detail() { $params = (new FenceHouseValidate())->goCheck('detail'); $result = FenceHouseLogic::detail($params); return $this->data($result); } public function datas() { $datas = (new FenceHouseLogic())->datas(input('')); return $this->success('', $datas); } }