|
...
|
...
|
@@ -47,7 +47,6 @@ class TranslateLogic extends BaseLogic |
|
|
|
$info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]);
|
|
|
|
//获取当前URl的所有文本内容
|
|
|
|
$new_key = $this->getUrlRead($url);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($new_key, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
if($info === false){
|
|
|
|
$translate_list = Translate::tran($new_key, $languageInfo['short']);
|
|
|
|
foreach ($new_key as $k=>$v){
|
|
...
|
...
|
@@ -60,6 +59,9 @@ class TranslateLogic extends BaseLogic |
|
|
|
$old_key = [];//key值组成数据
|
|
|
|
$data_read = json_decode($info['data'],true);
|
|
|
|
foreach ($data_read as $k => $v){
|
|
|
|
$data[] = [
|
|
|
|
$k=>$v,
|
|
|
|
];
|
|
|
|
$old_key[] = $k;
|
|
|
|
}
|
|
|
|
$news_key = [];
|
...
|
...
|
|