作者 lyh

gx

@@ -54,13 +54,8 @@ class RouteMap extends Base @@ -54,13 +54,8 @@ class RouteMap extends Base
54 * @date 2023/4/17 54 * @date 2023/4/17
55 */ 55 */
56 public static function generateRoute($title, $source, $source_id, $project_id){ 56 public static function generateRoute($title, $source, $source_id, $project_id){
57 - //有中文先翻译  
58 -// if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $title)){  
59 -// $title = Translate::tran($title, 'en');  
60 -// }  
61 // 所有的都需要翻译成为英文 57 // 所有的都需要翻译成为英文
62 $title = Translate::tran($title, 'en'); 58 $title = Translate::tran($title, 'en');
63 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($title, true) . PHP_EOL, FILE_APPEND);  
64 $i=1; 59 $i=1;
65 $sign = generateRoute($title); 60 $sign = generateRoute($title);
66 $info = self::where(['project_id' => $project_id, 'source' => $source, 'source_id'=>$source_id])->first(); 61 $info = self::where(['project_id' => $project_id, 'source' => $source, 'source_id'=>$source_id])->first();