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()); } }