no message

This commit is contained in:
hellcat 2025-07-15 19:17:54 +08:00
parent d543726d4b
commit 6bae861493
2 changed files with 25 additions and 8 deletions

View File

@ -34,6 +34,7 @@ class CronController
$s = date("s");
$iRand = rand(1, 1440);
$aUpdate = [];
$bSendTg = true;
// $isTest = 0;
//test
@ -53,6 +54,10 @@ class CronController
}
}
if (isset($aGet["bSendTg"])) {
$bSendTg = $aGet["bSendTg"];
}
// 暂停
$option = Option::where("type", "pause")->first();
$isPause = $option ? $option->value : null;

View File

@ -9,21 +9,33 @@ class Test extends Base {
{
$sTimeType = $aParam["aOption"][1];
$sValue = $aParam["aArg"][1];
$sIsText = $aParam["aOption"][2] ?? "yes";
if ($sIsText == "yes") {
$is_test = true;
} else if ($sIsText == "no") {
$is_test = false;
// $sIsText = $aParam["aOption"][2] ?? "yes";
$sSendTg = $aParam["aOption"][2] ?? "no";
if ($sValue == "?") {
return "#cron__{type:id,i_in10,rand}__{bSendTg:yes,no-default}";
}
if ($sSendTg == "yes") {
$bSendTg = true;
} else if ($sSendTg == "no") {
$bSendTg = false;
}
// if ($sIsText == "yes") {
// $is_test = true;
// } else if ($sIsText == "no") {
// $is_test = false;
// }
$this->oHttp->sMethod = "get";
$this->oHttp->sToUrl = env("APP_URL")."/cron";
$this->oHttp->bIsJson = true;
$this->oHttp->aData = [
"is_test" => $is_test,
"is_test" => true,
"time_type" => $sTimeType,
"v" => $sValue
"v" => $sValue,
"bSendTg" => $bSendTg
];
$r = $this->oHttp->send();