no message
This commit is contained in:
1 parent
08763435f3
commit
f571bf9392
3 files changed
+16
-7
No files matched your search
@@ -46,10 +46,7 @@ private function findValidUrlBySubKey($sSubKey, $iNum, $oFlow)
|
||||
$aAuthors = json_decode($sAuthors, true);
|
||||
|
||||
$oQuery = ModelArticles::whereIn("sAuthorCode", $aAuthors)->orderBy("id", "asc");
|
||||
// $oQuery = ArticleKeyAuthorMap::where("key", $sSubKey)->first()?->authors;
|
||||
// $oQuery = ModelArticles::where("sAuthorCode", $sAuthorCode)->orderBy("id", "asc");
|
||||
// $oQuery = ModelArticles::where("aOpt", "like", $sSubKey)->orderBy("id", "asc");
|
||||
// $oQuery = ModelArticles::where("aOpt", "like", '%'.$sSubKey.'%')->orderBy("id", "asc"); // 要这样吗
|
||||
|
||||
$iTotal = $oQuery->count();
|
||||
|
||||
if ($iTotal === 0) throw new \Exception("subkey:{$sSubKey} 旗下无任何记录");
|
||||
@@ -59,7 +56,7 @@ private function findValidUrlBySubKey($sSubKey, $iNum, $oFlow)
|
||||
$iTrueNum = $iOffset + 1; // 真正对应数据库的第几条
|
||||
|
||||
$oArticle = $oQuery->skip($iOffset)->first();
|
||||
echo "<pre>";var_dump($oArticle->aOpt["thumb_use"]);
|
||||
echo "<pre>";var_dump($oArticle->aOpt["thumb_use"]); // 是11
|
||||
// 2. 拼文件名
|
||||
$aThumbUse = $oArticle->aOpt["thumb_use"] ?? ["b"];
|
||||
$sThumbUse = $aThumbUse[array_rand($aThumbUse)];
|
||||
|
||||
Reference in new issue
Block a user