Merge branch 'pdf'

This commit is contained in:
2026-01-15 09:41:04 +08:00
+6 -2
View File
@@ -215,8 +215,12 @@ class UsedCarController extends BaseController
$toLang = $this->lang[$to];
$spark = new SparkService();
$str = $spark->chat("将“{$v}”翻译为{$toLang},不要有多余的描述");
$str = preg_replace('/[\x{4e00}-\x{9fa5}]/u', '', $str);
$data[$k] =str_replace(['(',')','(',')','"'], '', $str);;
if(!empty($str)){
$str = preg_replace('/[\x{4e00}-\x{9fa5}]/u', '', $str);
$data[$k] =str_replace(['(',')','(',')','"'], '', $str);
}else{
$data[$k] = '';
}
}
}
return $data;