|
...
|
...
|
@@ -35,7 +35,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
if($this->param['url'] == 'All'){
|
|
|
|
$info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]);
|
|
|
|
if(!empty($info) && !empty($info['data'])){
|
|
|
|
$translateInfo = json_decode($info['data'],true);
|
|
|
|
$translateInfo = json_decode($info['data'],JSON_UNESCAPED_UNICODE);
|
|
|
|
foreach ($translateInfo as $k => $v){
|
|
|
|
$data[] = [$k=>$v];
|
|
|
|
}
|
|
...
|
...
|
@@ -57,7 +57,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
$old_key = [];//key值组成数据
|
|
|
|
$data_read = json_decode($info['data']);
|
|
|
|
$data_read = json_decode($info['data'],JSON_UNESCAPED_UNICODE);
|
|
|
|
foreach ($data_read as $k => $v){
|
|
|
|
$old_key[] = $k;
|
|
|
|
$data[] = [$k => $v];
|
|
...
|
...
|
@@ -92,7 +92,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
$info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]);
|
|
|
|
$data = [];
|
|
|
|
if(!empty($info) && !empty($info['data'])){
|
|
|
|
$translateInfo = json_decode($info['data'],true);
|
|
|
|
$translateInfo = json_decode($info['data'],JSON_UNESCAPED_UNICODE);
|
|
|
|
foreach ($translateInfo as $k => $v){
|
|
|
|
$data[] = [$k=>$v];
|
|
|
|
}
|
|
...
|
...
|
@@ -113,7 +113,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
}
|
|
|
|
$new_list = $this->getUrlImageRead($url);
|
|
|
|
$old_list = [];
|
|
|
|
$data_read = json_decode($info['data'],true);
|
|
|
|
$data_read = json_decode($info['data'],JSON_UNESCAPED_UNICODE);
|
|
|
|
foreach ($data_read as $k=>$v){
|
|
|
|
$old_list[] = $k;
|
|
|
|
$data[] = [
|
|
...
|
...
|
@@ -251,10 +251,10 @@ class TranslateLogic extends BaseLogic |
|
|
|
'language_id'=>$this->param['language_id'],
|
|
|
|
'alias'=>$this->param['alias'],
|
|
|
|
];
|
|
|
|
$param['data'] = json_encode($this->param['data'],true);
|
|
|
|
$param['data'] = json_encode($this->param['data'],JSON_UNESCAPED_UNICODE);
|
|
|
|
$this->model->add($param);
|
|
|
|
}else{
|
|
|
|
$data = json_encode($this->param['data'],true);
|
|
|
|
$data = json_encode($this->param['data'],JSON_UNESCAPED_UNICODE);
|
|
|
|
$this->model->edit(['data'=>$data],['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'type'=>$this->param['type']]);
|
|
|
|
}
|
|
|
|
// }catch (\Exception $e){
|
...
|
...
|
|