作者 lyh

gx

@@ -545,7 +545,7 @@ class BTemplateLogic extends BaseLogic @@ -545,7 +545,7 @@ class BTemplateLogic extends BaseLogic
545 public function homeOrProduct($source,$source_id = 0,$is_custom = 0){ 545 public function homeOrProduct($source,$source_id = 0,$is_custom = 0){
546 if($is_custom == 0){ 546 if($is_custom == 0){
547 if($source == BTemplate::SOURCE_HOME){ 547 if($source == BTemplate::SOURCE_HOME){
548 - $route = RouteMap::setRoute('index', RouteMap::SOURCE_PAGE, 0, $this->user['project_id']); 548 + RouteMap::setRoute('index', RouteMap::SOURCE_PAGE, 0, $this->user['project_id']);
549 $type = RouteMap::SOURCE_PAGE; 549 $type = RouteMap::SOURCE_PAGE;
550 }elseif($source == BTemplate::SOURCE_PRODUCT){ 550 }elseif($source == BTemplate::SOURCE_PRODUCT){
551 $type = RouteMap::SOURCE_PRODUCT; 551 $type = RouteMap::SOURCE_PRODUCT;
@@ -54,9 +54,7 @@ class RouteMap extends Base @@ -54,9 +54,7 @@ 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 - if(!preg_match('/^[a-zA-Z]$/', $title)){  
58 - $title = Translate::tran($title, 'en');  
59 - } 57 + $title = Translate::tran($title, 'en');
60 $i=1; 58 $i=1;
61 $sign = generateRoute($title); 59 $sign = generateRoute($title);
62 $info = self::where(['project_id' => $project_id, 'source' => $source, 'source_id'=>$source_id])->first(); 60 $info = self::where(['project_id' => $project_id, 'source' => $source, 'source_id'=>$source_id])->first();