正在显示
1 个修改的文件
包含
3 行增加
和
4 行删除
| @@ -56,6 +56,7 @@ class TranslateLogic extends BaseLogic | @@ -56,6 +56,7 @@ class TranslateLogic extends BaseLogic | ||
| 56 | $old_key = [];//key值组成数据 | 56 | $old_key = [];//key值组成数据 |
| 57 | if($info !== false){ | 57 | if($info !== false){ |
| 58 | $data_read = json_decode($info['data'],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); | 58 | $data_read = json_decode($info['data'],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
| 59 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($data_read, true) . PHP_EOL, FILE_APPEND); | ||
| 59 | foreach ($data_read as $k => $v){ | 60 | foreach ($data_read as $k => $v){ |
| 60 | $old_key[] = $k; | 61 | $old_key[] = $k; |
| 61 | $data[] = [$k => $v]; | 62 | $data[] = [$k => $v]; |
| @@ -261,13 +262,11 @@ class TranslateLogic extends BaseLogic | @@ -261,13 +262,11 @@ class TranslateLogic extends BaseLogic | ||
| 261 | 'language_id'=>$this->param['language_id'], | 262 | 'language_id'=>$this->param['language_id'], |
| 262 | 'alias'=>$this->param['alias'], | 263 | 'alias'=>$this->param['alias'], |
| 263 | ]; | 264 | ]; |
| 264 | - $param['data'] = json_encode($data,JSON_UNESCAPED_UNICODE); | 265 | + $param['data'] = json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
| 265 | $rs = $this->model->add($param); | 266 | $rs = $this->model->add($param); |
| 266 | }else{ | 267 | }else{ |
| 267 | if(!empty($data)){ | 268 | if(!empty($data)){ |
| 268 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND); | ||
| 269 | - $data = json_encode($data,JSON_UNESCAPED_UNICODE); | ||
| 270 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($data, true) . PHP_EOL, FILE_APPEND); | 269 | + $data = json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
| 271 | $rs = $this->model->edit(['data'=>$data],['language_id'=>$this->param['language_id'],'project_id'=>$this->user['project_id'],'url'=>$this->param['url'],'type'=>$this->param['type']]); | 270 | $rs = $this->model->edit(['data'=>$data],['language_id'=>$this->param['language_id'],'project_id'=>$this->user['project_id'],'url'=>$this->param['url'],'type'=>$this->param['type']]); |
| 272 | } | 271 | } |
| 273 | } | 272 | } |
-
请 注册 或 登录 后发表评论