初始版本

This commit is contained in:
贾祥聪
2025-08-19 14:16:51 +08:00
commit f937a1f9b9
4373 changed files with 359728 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\TextLogic;
use app\adminapi\validate\setting\TextValidate;
class TextController extends BaseAdminController
{
/**
* @notes 列表
* @return \think\response\Json
* @author cjhao
* @date 2024/11/1 10:17
*/
public function lists()
{
return $this->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);
}
}