|
...
|
...
|
@@ -34,8 +34,11 @@ 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']]);
|
|
|
|
$data = [];
|
|
|
|
if(!empty($info)){
|
|
|
|
$data = json_decode($info['data'],true);
|
|
|
|
if(!empty($info) && !empty($info['data'])){
|
|
|
|
$translateInfo = json_decode($info['data'],true);
|
|
|
|
foreach ($translateInfo as $k => $v){
|
|
|
|
$data[] = [$k=>$v];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
...
|
...
|
@@ -82,8 +85,11 @@ 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']]);
|
|
|
|
$data = [];
|
|
|
|
if(!empty($info)){
|
|
|
|
$data = json_decode($info['data'],true);
|
|
|
|
if(!empty($info) && !empty($info['data'])){
|
|
|
|
$translateInfo = json_decode($info['data'],true);
|
|
|
|
foreach ($translateInfo as $k => $v){
|
|
|
|
$data[] = [$k=>$v];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
...
|
...
|
@@ -227,7 +233,7 @@ class TranslateLogic extends BaseLogic |
|
|
|
$info = $this->model->read(['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'type'=>$this->param['type']]);
|
|
|
|
if($info === false){
|
|
|
|
$param = [
|
|
|
|
'type'=>1,
|
|
|
|
'type'=>$this->param['type'],
|
|
|
|
'project_id'=>$this->user['project_id'],
|
|
|
|
'url'=>str_replace_url($this->param['url']),
|
|
|
|
'language_id'=>$this->param['language_id'],
|
...
|
...
|
|