From c92af8eec59ab19455cd745d7b695def50bfd1d4 Mon Sep 17 00:00:00 2001 From: hellcat Date: Mon, 17 Aug 2026 17:59:17 +0800 Subject: [PATCH] no message --- app/Http/Controllers/CronV2Controller.php | 17 ++++++++++++----- app/Services/TG/Hook/Mod/Test.php | 8 ++++++++ just/tom无脑流程.text | 2 +- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/CronV2Controller.php b/app/Http/Controllers/CronV2Controller.php index 7a38f5c..1840dd7 100755 --- a/app/Http/Controllers/CronV2Controller.php +++ b/app/Http/Controllers/CronV2Controller.php @@ -205,6 +205,13 @@ class CronV2Controller private function run($aArticle) { + + $shabi = "https://"; + + if (env("www_master") == "dd.loc") { + $shabi = "http://"; + } +// echo 111;exit; foreach ($aArticle as $row) { $this->sUserName = $row["user_name"]; $this->sMailName = $row["mail_name"]; @@ -230,7 +237,7 @@ class CronV2Controller $oHttp = new Http(); $oHttp->sMethod = "post"; - $sMasterUrl = "https://".env("www_master")."/api/github/get"; + $sMasterUrl = $shabi.env("www_master")."/api/github/get"; // $oHttp->bIsJson = true; $oHttp->aData = $row; $sReadMe = $oHttp->send($sMasterUrl); @@ -273,7 +280,7 @@ class CronV2Controller $oHttp->sMethod = "get"; // $sMasterUrl = env("api_url_freenode_base")."/api/github/getfntoday/".$sFnCode; // /api/v1/freenode/url_feed_today/{siteCode}/{client?} - $sMasterUrl = "https://".env("www_master")."/api/v1/freenode/url_feed_today/".$row["fn_code_short"]; + $sMasterUrl = $shabi.env("www_master")."/api/v1/freenode/url_feed_today/".$row["fn_code_short"]; $sReturn = $oHttp->send($sMasterUrl); $aReturn = json_decode($sReturn, true); @@ -286,9 +293,9 @@ class CronV2Controller } if ($aReturn["code"] == "200") { - file_put_contents($this->sProjectPath."/feed/clash-".$sFnCode.".yaml", $aReturn["data"]["clash"]); - file_put_contents($this->sProjectPath."/feed/v2ray-".$sFnCode.".txt", $aReturn["data"]["v2ray"]); - file_put_contents($this->sProjectPath."/feed/singbox-".$sFnCode.".txt", $aReturn["data"]["singbox"]); + file_put_contents($this->sProjectPath."/feed/clash-".$sFnCode.".yaml", file_get_contents($aReturn["data"]["clash"])); + file_put_contents($this->sProjectPath."/feed/v2ray-".$sFnCode.".txt", file_get_contents($aReturn["data"]["v2ray"])); + file_put_contents($this->sProjectPath."/feed/singbox-".$sFnCode.".txt", file_get_contents($aReturn["data"]["singbox"])); } // 写入内容 diff --git a/app/Services/TG/Hook/Mod/Test.php b/app/Services/TG/Hook/Mod/Test.php index 239bec2..b50939e 100644 --- a/app/Services/TG/Hook/Mod/Test.php +++ b/app/Services/TG/Hook/Mod/Test.php @@ -52,6 +52,7 @@ class Test extends Base { public function cronV2($aParam) { +// echo 111;exit; if (($aParam["aArg"][1] ?? false) == "?") { return "#cron__{type:id,i_in10,rand}__{bSendTg:y,n-default}__{bPull:y,n-defulat}"; } @@ -74,10 +75,17 @@ class Test extends Base { // $is_test = true; // } else if ($sIsText == "no") { // $is_test = false; +// } + +// $shabi = "https://"; +// +// if (env("www_master") == "dd.loc") { +// $shabi = "http://"; // } $this->oHttp->sMethod = "get"; $this->oHttp->sToUrl = env("APP_URL")."/cronv2"; +// var_dump($this->oHttp->sToUrl);exit; $this->oHttp->bIsJson = true; $this->oHttp->aData = [ "is_test" => true, diff --git a/just/tom无脑流程.text b/just/tom无脑流程.text index 3399206..f272730 100644 --- a/just/tom无脑流程.text +++ b/just/tom无脑流程.text @@ -89,7 +89,7 @@ tg测试 到SSH config updated successfully. 到git push -u origin main错误,就基本ok了,到linux上提交确认kownhost sudo -u www-data git add . - sudo -u www-data git push -u origin main + sudo -u www-data git push -u origin main --force 提交成功就ok,通了 最后挂上cron:* * * * * curl -s https://github-2.diaodu.us/cron > /dev/null