dataLists(); } /** * @notes 添加 * @return \think\response\Json * @author cjhao * @date 2024/11/1 10:17 */ public function add() { $params = (new TextValidate())->post()->goCheck('add'); (new TextLogic())->add($params); return $this->success('添加成功',[],1,1); } /** * @notes 编辑 * @return \think\response\Json * @author cjhao * @date 2024/11/1 10:19 */ public function edit() { $params = (new TextValidate())->post()->goCheck(); (new TextLogic())->edit($params); return $this->success('编辑成功',[],1,1); } /** * @notes 删除 * @return \think\response\Json * @author cjhao * @date 2024/11/1 10:21 */ public function del() { $params = (new TextValidate())->post()->goCheck('id'); $result = (new TextLogic())->del($params['id']); if(true === $result){ return $this->success('删除成功',[],1,1); } return $this->fail($result); } }