正在显示
1 个修改的文件
包含
4 行增加
和
6 行删除
| @@ -55,14 +55,12 @@ class TranslateLogic extends BaseLogic | @@ -55,14 +55,12 @@ class TranslateLogic extends BaseLogic | ||
| 55 | // 原始校对程序 | 55 | // 原始校对程序 |
| 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); | 58 | + $data_read = json_decode($info['data'],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
| 59 | foreach ($data_read as $k => $v){ | 59 | foreach ($data_read as $k => $v){ |
| 60 | $old_key[] = $k; | 60 | $old_key[] = $k; |
| 61 | $data[] = [$k => $v]; | 61 | $data[] = [$k => $v]; |
| 62 | } | 62 | } |
| 63 | } | 63 | } |
| 64 | - $json_text = json_encode($text_array,JSON_UNESCAPED_UNICODE); | ||
| 65 | - $text_array = json_decode($json_text,JSON_UNESCAPED_UNICODE); | ||
| 66 | $arr2 = array_values(array_diff($text_array, $old_key)); | 64 | $arr2 = array_values(array_diff($text_array, $old_key)); |
| 67 | if(!empty($arr2)){ | 65 | if(!empty($arr2)){ |
| 68 | $i = 0; | 66 | $i = 0; |
| @@ -125,7 +123,7 @@ class TranslateLogic extends BaseLogic | @@ -125,7 +123,7 @@ class TranslateLogic extends BaseLogic | ||
| 125 | } | 123 | } |
| 126 | $new_list = $this->getUrlImageRead($url); | 124 | $new_list = $this->getUrlImageRead($url); |
| 127 | $old_list = []; | 125 | $old_list = []; |
| 128 | - $data_read = json_decode($info['data'],JSON_UNESCAPED_UNICODE); | 126 | + $data_read = json_decode($info['data'],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
| 129 | foreach ($data_read as $k=>$v){ | 127 | foreach ($data_read as $k=>$v){ |
| 130 | $old_list[] = $k; | 128 | $old_list[] = $k; |
| 131 | $data[] = [ | 129 | $data[] = [ |
| @@ -257,11 +255,11 @@ class TranslateLogic extends BaseLogic | @@ -257,11 +255,11 @@ class TranslateLogic extends BaseLogic | ||
| 257 | 'language_id'=>$this->param['language_id'], | 255 | 'language_id'=>$this->param['language_id'], |
| 258 | 'alias'=>$this->param['alias'], | 256 | 'alias'=>$this->param['alias'], |
| 259 | ]; | 257 | ]; |
| 260 | - $param['data'] = json_encode($data,JSON_UNESCAPED_UNICODE); | 258 | + $param['data'] = json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
| 261 | $this->model->add($param); | 259 | $this->model->add($param); |
| 262 | }else{ | 260 | }else{ |
| 263 | if(!empty($data)){ | 261 | if(!empty($data)){ |
| 264 | - $data = json_encode($data,JSON_UNESCAPED_UNICODE); | 262 | + $data = json_encode($data,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
| 265 | $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']]); | 263 | $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']]); |
| 266 | } | 264 | } |
| 267 | } | 265 | } |
-
请 注册 或 登录 后发表评论