dataLists(new VehicleLists()); } /** * @notes 添加 * @return \think\response\Json * @author likeadmin * @date 2023/08/17 09:23 */ public function add() { $params = (new VehicleValidate())->post()->goCheck('add'); $result = VehicleLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(VehicleLogic::getError()); } /** * @notes 编辑 * @return \think\response\Json * @author likeadmin * @date 2023/08/17 09:23 */ public function edit() { $params = (new VehicleValidate())->post()->goCheck('edit'); $result = VehicleLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(VehicleLogic::getError()); } /** * @notes 获取详情 * @return \think\response\Json * @author likeadmin * @date 2023/08/17 09:23 */ public function detail() { $params = (new VehicleValidate())->goCheck('detail'); $result = VehicleLogic::detail($params); return $this->data($result); } }