no message

This commit is contained in:
hellcat 2026-01-12 16:24:05 +08:00
parent 6d318bb109
commit 04a741b609

View File

@ -49,7 +49,7 @@ class ArticleCache extends Base {
public function show($aParam)
{
$xCode = $aParam["aArg"][0] ?? ":last";
$xCode = $aParam["aArg"][1] ?? ":last";
$sCode = $xCode;
if ($xCode == "?") {
@ -65,9 +65,30 @@ class ArticleCache extends Base {
$a = [];
foreach ($aCache as $aCacheRow) {
$aContent = json_decode($aCacheRow['content'], true);
$a[] = $aContent;
$a["id:".$aCacheRow['id']] = $aContent;
}
return $this->toJson($a);
}
public function echo($aParam)
{
$iId = $aParam["aArg"][1] ?? "";
if ($iId === "?") {
return "#show__[id]show()获取id";
}
if (!$iId) {
return "id必须";
}
$oCache = ModelArticleCache::where("id", $iId)->first();
if (!$oCache) {
return "没找到";
}
return $oCache->content;
}
}