dataLists(new DecorateSwiperLists()); } /** * @notes 添加轮播图 * @return \think\response\Json * @author BD * @date 2024/03/16 17:34 */ public function add() { $params = (new DecorateSwiperValidate())->post()->goCheck('add'); $result = DecorateSwiperLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(DecorateSwiperLogic::getError()); } /** * @notes 编辑轮播图 * @return \think\response\Json * @author BD * @date 2024/03/16 17:34 */ public function edit() { $params = (new DecorateSwiperValidate())->post()->goCheck('edit'); $result = DecorateSwiperLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(DecorateSwiperLogic::getError()); } /** * @notes 删除轮播图 * @return \think\response\Json * @author BD * @date 2024/03/16 17:34 */ public function delete() { $params = (new DecorateSwiperValidate())->post()->goCheck('delete'); DecorateSwiperLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取轮播图详情 * @return \think\response\Json * @author BD * @date 2024/03/16 17:34 */ public function detail() { $params = (new DecorateSwiperValidate())->goCheck('detail'); $result = DecorateSwiperLogic::detail($params); return $this->data($result); } }