|
...
|
...
|
@@ -6,6 +6,7 @@ use App\Helper\Translate; |
|
|
|
use App\Http\Logic\Aside\Project\ProjectLogic;
|
|
|
|
use App\Models\Base;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\Template\BTemplate;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 路由映射表
|
|
...
|
...
|
@@ -55,9 +56,17 @@ class RouteMap extends Base |
|
|
|
$i=1;
|
|
|
|
$sign = generateRoute($title);
|
|
|
|
$route = $sign;
|
|
|
|
if($source == BTemplate::SOURCE_PRODUCT){
|
|
|
|
$route = $sign.'-product';
|
|
|
|
}elseif ($source == 5){
|
|
|
|
$route = $sign.'-tag';
|
|
|
|
}
|
|
|
|
while(self::isExist($route, $source, $source_id, $project_id)){
|
|
|
|
$route = $sign .'-'.$i;
|
|
|
|
$i++;
|
|
|
|
if($source == BTemplate::SOURCE_PRODUCT){
|
|
|
|
$route = $sign .'-'.$i.'-product';
|
|
|
|
}elseif ($source == 5){
|
|
|
|
$route = $sign .'-'.$i.'-tag';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $route;
|
|
|
|
}
|
...
|
...
|
|