first commit

This commit is contained in:
Your Name
2026-01-19 14:19:22 +08:00
commit fe2d9c1868
4777 changed files with 665503 additions and 0 deletions

View File

@@ -0,0 +1,122 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\LanguagePagLists;
use app\adminapi\logic\setting\LanguagePagLogic;
use app\adminapi\validate\setting\LanguagePagValidate;
/**
* 语言包控制器
* Class LanguagePagController
* @package app\adminapi\controller\setting
*/
class LanguagePagController extends BaseAdminController
{
/**
* @notes 获取语言包列表
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function lists()
{
return $this->dataLists(new LanguagePagLists());
}
/**
* @notes 添加语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function add()
{
$params = (new LanguagePagValidate())->post()->goCheck('add');
$result = LanguagePagLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(LanguagePagLogic::getError());
}
/**
* @notes 编辑语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function edit()
{
$params = (new LanguagePagValidate())->post()->goCheck('edit');
$result = LanguagePagLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(LanguagePagLogic::getError());
}
/**
* @notes 删除语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function delete()
{
$params = (new LanguagePagValidate())->post()->goCheck('delete');
LanguagePagLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取语言包详情
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function detail()
{
$params = (new LanguagePagValidate())->goCheck('detail');
$result = LanguagePagLogic::detail($params);
return $this->data($result);
}
/**
* @notes 同步语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function sync()
{
$params = $this->request->post();
LanguagePagLogic::sync($params);
return $this->success('同步成功', [], 1, 1);
}
/**
* @notes 翻译语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function trans()
{
$params = $this->request->post();
$result = LanguagePagLogic::trans($params);
if (true === $result) {
return $this->success('翻译成功', [], 1, 1);
}
return $this->fail(LanguagePagLogic::getError());
}
}