diff --git a/app/Http/Controllers/Api/Images/GetController.php b/app/Http/Controllers/Api/Images/GetController.php index b1d8562..6f9b2f0 100644 --- a/app/Http/Controllers/Api/Images/GetController.php +++ b/app/Http/Controllers/Api/Images/GetController.php @@ -45,7 +45,7 @@ private function findValidUrlBySubKey($sSubKey, $iNum, $oFlow) $sAuthors = ArticleKeyAuthorMap::where("key", $sSubKey)->first()?->authors; $aAuthors = json_decode($sAuthors, true); - $oQuery = ModelArticles::whereIn("sAuthorCode", $aAuthors)->orderBy("id", "asc"); + $oQuery = ModelArticles::whereIn("sAuthorCode", $aAuthors)->where("status", 1)->orderBy("id", "asc"); $iTotal = $oQuery->count(); @@ -56,7 +56,7 @@ private function findValidUrlBySubKey($sSubKey, $iNum, $oFlow) $iTrueNum = $iOffset + 1; // 真正对应数据库的第几条 $oArticle = $oQuery->skip($iOffset)->first(); -//echo "
";var_dump($oArticle->aOpt["thumb_use"]); // 是11
+
             // 2. 拼文件名
             $aThumbUse = $oArticle->aOpt["thumb_use"] ?? ["b"];
             $sThumbUse = $aThumbUse[array_rand($aThumbUse)];