dataLists(); } /** * @notes 预售添加 * @return \think\response\Json * @author lbzy * @datetime 2024-04-24 09:15:28 */ function add() { $params = (new PresellValidate())->post()->goCheck('add'); $result = PresellLogic::add($params); if ($result === true) { return $this->success('添加成功', [],1, 1); } return $this->fail(PresellLogic::getError()); } /** * @notes 预售编辑 * @return \think\response\Json * @author lbzy * @datetime 2024-04-24 14:23:42 */ function edit() { $params = (new PresellValidate())->post()->goCheck('edit'); $result = PresellLogic::edit($params); if ($result === true) { return $this->success('编辑成功', [],1, 1); } return $this->fail(PresellLogic::getError()); } /** * @notes 预售详情 * @return \think\response\Json * @author lbzy * @datetime 2024-04-24 17:34:22 */ function detail() { (new PresellValidate())->goCheck('detail'); return $this->success('成功', PresellLogic::detail(input())); } /** * @notes 开始活动 * @return \think\response\Json * @author lbzy * @datetime 2024-04-24 17:38:19 */ function start() { $params = (new PresellValidate())->post()->goCheck('detail'); $result = PresellLogic::start($params); if ($result === true) { return $this->success('开始成功', [], 1, 1); } return $this->fail(PresellLogic::getError()); } /** * @notes 结束活动 * @return \think\response\Json * @author lbzy * @datetime 2024-04-24 17:44:56 */ function end() { $params = (new PresellValidate())->post()->goCheck('detail'); $result = PresellLogic::end($params); if ($result === true) { return $this->success('结束成功', [], 1, 1); } return $this->fail(PresellLogic::getError()); } /** * @notes 删除活动 * @return \think\response\Json * @author lbzy * @datetime 2024-04-24 17:47:02 */ function delete() { $params = (new PresellValidate())->post()->goCheck('detail'); $result = PresellLogic::delete($params); if ($result === true) { return $this->success('删除成功', [], 1, 1); } return $this->fail(PresellLogic::getError()); } }