1
This commit is contained in:
@@ -52,9 +52,9 @@ class TranslationJob
|
||||
foreach ($languages as $lang => $xflang) {
|
||||
|
||||
if($entityType =='location'){
|
||||
// $fields = $translator->location($sourceFields,$lang,$sourceLang);
|
||||
$fields = $translator->location($sourceFields,$lang,$sourceLang);
|
||||
}else{
|
||||
// $fields = $translator->vehicle($sourceFields,$lang,$sourceLang);
|
||||
$fields = $translator->vehicle($sourceFields,$lang,$sourceLang);
|
||||
}
|
||||
|
||||
$translationModel = $translationModels[$xflang];
|
||||
@@ -64,7 +64,6 @@ class TranslationJob
|
||||
}else{
|
||||
$translation = new $translationModel();
|
||||
}
|
||||
$fields = [];
|
||||
$translation->fill($fields);
|
||||
$res = $translation->save();
|
||||
log::info('$languages save '.$lang, [$res,$fields]);
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
namespace app\util;
|
||||
|
||||
|
||||
use support\Log;
|
||||
|
||||
class Xunfei
|
||||
{
|
||||
|
||||
@@ -113,6 +115,7 @@ digest: %s", "ntrans.xfyun.cn", $date, $digestBase64);
|
||||
try {
|
||||
$res = $this->xfyun($text, $from, $to);
|
||||
$data = json_decode($res["body"], true);
|
||||
log::info('fanyi',$data);
|
||||
if ($data["code"] === 0) {
|
||||
return $data["data"]["result"];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user