소스 검색

fix: SitePageTag getBySlug

igb 2 달 전
부모
커밋
f741d00187
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Models/SitePageTag.php

+ 1 - 1
app/Models/SitePageTag.php

@@ -26,7 +26,7 @@ class SitePageTag extends Model
     // 根据slug获取标签和关联的页面
     public static function getBySlug($slug, $perPage = 10)
     {
-        $tag = self::where('slug', $slug)->first();
+        $tag = self::where('slug', $slug)->where('dist_id', getDistId())->first();
 
         if (!$tag) {
             return null; // 没找到标签