pdf优化

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