正在显示
1 个修改的文件
包含
4 行增加
和
2 行删除
| @@ -56,6 +56,7 @@ class TranslateLogic extends BaseLogic | @@ -56,6 +56,7 @@ class TranslateLogic extends BaseLogic | ||
| 56 | $param = $this->getRouteSource($this->param['url']); | 56 | $param = $this->getRouteSource($this->param['url']); |
| 57 | $param['language_id'] = $this->param['language_id']; | 57 | $param['language_id'] = $this->param['language_id']; |
| 58 | $param['type'] = $this->param['type']; | 58 | $param['type'] = $this->param['type']; |
| 59 | + $param['url'] = $this->param['url']; | ||
| 59 | $info = $this->model->with('translate_data')->where($param)->first(); | 60 | $info = $this->model->with('translate_data')->where($param)->first(); |
| 60 | //获取当前URl的所有文本内容 | 61 | //获取当前URl的所有文本内容 |
| 61 | $text_array = $this->getUrlRead($url); | 62 | $text_array = $this->getUrlRead($url); |
| @@ -279,7 +280,7 @@ class TranslateLogic extends BaseLogic | @@ -279,7 +280,7 @@ class TranslateLogic extends BaseLogic | ||
| 279 | try { | 280 | try { |
| 280 | $info = $this->model->read(['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'project_id'=>$this->user['project_id'],'type'=>$this->param['type']]); | 281 | $info = $this->model->read(['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'project_id'=>$this->user['project_id'],'type'=>$this->param['type']]); |
| 281 | if($info === false){ | 282 | if($info === false){ |
| 282 | - $sourceInfo = $this->getRouteSource($sendData['new_route']); | 283 | + $sourceInfo = $this->getRouteSource($this->param['url']); |
| 283 | $param = [ | 284 | $param = [ |
| 284 | 'type'=>$this->param['type'] ?? 1, | 285 | 'type'=>$this->param['type'] ?? 1, |
| 285 | 'project_id'=>$this->user['project_id'], | 286 | 'project_id'=>$this->user['project_id'], |
| @@ -289,7 +290,8 @@ class TranslateLogic extends BaseLogic | @@ -289,7 +290,8 @@ class TranslateLogic extends BaseLogic | ||
| 289 | 'source'=>$sourceInfo['source'], | 290 | 'source'=>$sourceInfo['source'], |
| 290 | 'source_id'=>$sourceInfo['source_id'], | 291 | 'source_id'=>$sourceInfo['source_id'], |
| 291 | 'is_list'=>$sourceInfo['is_list'], | 292 | 'is_list'=>$sourceInfo['is_list'], |
| 292 | - 'is_custom'=>$sourceInfo['is_custom'] | 293 | + 'is_custom'=>$sourceInfo['is_custom'], |
| 294 | + 'page'=>$sourceInfo['page'] ?? 0 | ||
| 293 | ]; | 295 | ]; |
| 294 | $id = $this->model->addReturnId($param); | 296 | $id = $this->model->addReturnId($param); |
| 295 | TranslateData::insert(['trans_id'=>$id,'data'=>json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)]); | 297 | TranslateData::insert(['trans_id'=>$id,'data'=>json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)]); |
-
请 注册 或 登录 后发表评论