dataLists(new DecorateHintLists()); } /** * @notes 添加提示内容 * @return \think\response\Json * @author BD * @date 2024/03/17 17:01 */ public function add() { $params = (new DecorateHintValidate())->post()->goCheck('add'); $result = DecorateHintLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(DecorateHintLogic::getError()); } /** * @notes 编辑提示内容 * @return \think\response\Json * @author BD * @date 2024/03/17 17:01 */ public function edit() { $params = (new DecorateHintValidate())->post()->goCheck('edit'); $result = DecorateHintLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(DecorateHintLogic::getError()); } /** * @notes 删除提示内容 * @return \think\response\Json * @author BD * @date 2024/03/17 17:01 */ public function delete() { $params = (new DecorateHintValidate())->post()->goCheck('delete'); DecorateHintLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取提示内容详情 * @return \think\response\Json * @author BD * @date 2024/03/17 17:01 */ public function detail() { $params = (new DecorateHintValidate())->goCheck('detail'); $result = DecorateHintLogic::detail($params); return $this->data($result); } /** * @notes 消息列表 * @return \think\response\Json * @author BD * @date 2024/03/17 17:01 */ public function allByType() { $params = $this->request->get(); $result = DecorateHintLogic::allByType($params); return $this->data($result); } }