作者 lyh

gx

... ... @@ -258,12 +258,12 @@ class TranslateLogic extends BaseLogic
}
//解析路由
$sendData = $this->handleRoute($this->param['url']);
// try {
try {
$info = $this->model->read(['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'project_id'=>$this->user['project_id'],'type'=>$this->param['type']]);
if($info === false){
$sourceInfo = $this->getRouteSource($sendData['new_route']);
$param = [
'type'=>$this->param['type'],
'type'=>$this->param['type'] ?? 1,
'project_id'=>$this->user['project_id'],
'url'=>str_replace_url($this->param['url']),
'language_id'=>$this->param['language_id'],
... ... @@ -284,9 +284,9 @@ class TranslateLogic extends BaseLogic
//写日志
$userLogModel = new UserLog();
$userLogModel->add(['model'=>'translate/save','remark'=>json_encode($this->param,true),'type'=>0,'operator_id'=>$this->user['id'],'project_id'=>$this->user['project_id']]);
// }catch (\Exception $e){
// $this->fail('系统错误请联系管理员');
// }
}catch (\Exception $e){
$this->fail('系统错误请联系管理员');
}
$this->sendMessage($sendData);
return $this->success();
}
... ...