no message

This commit is contained in:
hellcat 2026-01-12 16:09:00 +08:00
parent 8f0e4ceae3
commit 6d318bb109

View File

@ -46,4 +46,28 @@ class ArticleCache extends Base {
return $r;
}
public function show($aParam)
{
$xCode = $aParam["aArg"][0] ?? ":last";
$sCode = $xCode;
if ($xCode == "?") {
return "#show__[code:last]";
}
if ($xCode === ":last") {
$sCode = ModelArticleCache::orderBy("id", "desc")->first()?->code;
}
$aCache = ModelArticleCache::where("code", $sCode)->get()->toArray();
$a = [];
foreach ($aCache as $aCacheRow) {
$aContent = json_decode($aCacheRow['content'], true);
$a[] = $aContent;
}
return $this->toJson($a);
}
}