|
...
|
...
|
@@ -56,6 +56,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
$param = $this->getRouteSource($this->param['url']);
|
|
|
|
$param['language_id'] = $this->param['language_id'];
|
|
|
|
$param['type'] = $this->param['type'];
|
|
|
|
$param['url'] = $this->param['url'];
|
|
|
|
$info = $this->model->with('translate_data')->where($param)->first();
|
|
|
|
//获取当前URl的所有文本内容
|
|
|
|
$text_array = $this->getUrlRead($url);
|
|
...
|
...
|
@@ -279,7 +280,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
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']);
|
|
|
|
$sourceInfo = $this->getRouteSource($this->param['url']);
|
|
|
|
$param = [
|
|
|
|
'type'=>$this->param['type'] ?? 1,
|
|
|
|
'project_id'=>$this->user['project_id'],
|
|
...
|
...
|
@@ -289,7 +290,8 @@ class TranslateLogic extends BaseLogic |
|
|
|
'source'=>$sourceInfo['source'],
|
|
|
|
'source_id'=>$sourceInfo['source_id'],
|
|
|
|
'is_list'=>$sourceInfo['is_list'],
|
|
|
|
'is_custom'=>$sourceInfo['is_custom']
|
|
|
|
'is_custom'=>$sourceInfo['is_custom'],
|
|
|
|
'page'=>$sourceInfo['page'] ?? 0
|
|
|
|
];
|
|
|
|
$id = $this->model->addReturnId($param);
|
|
|
|
TranslateData::insert(['trans_id'=>$id,'data'=>json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)]);
|
...
|
...
|
|