正在显示
1 个修改的文件
包含
11 行增加
和
2 行删除
| @@ -6,6 +6,7 @@ use App\Helper\Translate; | @@ -6,6 +6,7 @@ use App\Helper\Translate; | ||
| 6 | use App\Http\Logic\Aside\Project\ProjectLogic; | 6 | use App\Http\Logic\Aside\Project\ProjectLogic; |
| 7 | use App\Models\Base; | 7 | use App\Models\Base; |
| 8 | use App\Models\Project\Project; | 8 | use App\Models\Project\Project; |
| 9 | +use App\Models\Template\BTemplate; | ||
| 9 | 10 | ||
| 10 | /** | 11 | /** |
| 11 | * 路由映射表 | 12 | * 路由映射表 |
| @@ -55,9 +56,17 @@ class RouteMap extends Base | @@ -55,9 +56,17 @@ class RouteMap extends Base | ||
| 55 | $i=1; | 56 | $i=1; |
| 56 | $sign = generateRoute($title); | 57 | $sign = generateRoute($title); |
| 57 | $route = $sign; | 58 | $route = $sign; |
| 59 | + if($source == BTemplate::SOURCE_PRODUCT){ | ||
| 60 | + $route = $sign.'-product'; | ||
| 61 | + }elseif ($source == 5){ | ||
| 62 | + $route = $sign.'-tag'; | ||
| 63 | + } | ||
| 58 | while(self::isExist($route, $source, $source_id, $project_id)){ | 64 | while(self::isExist($route, $source, $source_id, $project_id)){ |
| 59 | - $route = $sign .'-'.$i; | ||
| 60 | - $i++; | 65 | + if($source == BTemplate::SOURCE_PRODUCT){ |
| 66 | + $route = $sign .'-'.$i.'-product'; | ||
| 67 | + }elseif ($source == 5){ | ||
| 68 | + $route = $sign .'-'.$i.'-tag'; | ||
| 69 | + } | ||
| 61 | } | 70 | } |
| 62 | return $route; | 71 | return $route; |
| 63 | } | 72 | } |
-
请 注册 或 登录 后发表评论