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

View File

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