no message

This commit is contained in:
hellcat 2025-04-16 18:48:43 +08:00
parent 42457e5c85
commit f55ce265d8
4 changed files with 58 additions and 11 deletions

View File

@ -116,7 +116,10 @@ class CronController
}
// 写入内容
file_put_contents($this->sProjectPath."/README.md", $this->formatstr($sReadMe));
if ($sReadMe) {
file_put_contents($this->sProjectPath."/README.md", $this->formatstr($sReadMe));
}
file_put_contents($this->sProjectPath."/version.text", time());
// 提交

View File

@ -28,8 +28,8 @@ class TestsController
//test
// $s = "\/AticleSet__1115zz__sale_rate 1118.118";
$s = "\/git#LastTime 1";
// $s= "/test#cron__i 07";
// $s = "\/git#LastTime 1";
$s= "/test#cron__i 07";
$oHttp = new Http();
$oHttp->sMethod = "post";

View File

@ -0,0 +1,26 @@
<?php
namespace App\Services\Github\Mod;
use App\Services\TomTool\Http;
class Base {
public function __construct()
{
$this->oHttp = new Http();
}
public function todayUpd()
{
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/todayupd';
$r = $this->oHttp->send();
if ($r == 1) {
return true;
} else {
return false;
}
}
}

View File

@ -2,7 +2,7 @@
namespace App\Services\Github\Mod;
use App\Services\TomTool\Http;
class FreeNode {
class FreeNode extends Base {
public $sTitle; // 必须
public $sContent; // 必须
@ -11,9 +11,12 @@ class FreeNode {
public function A($aArticle)
{
$oHttp = new Http();
$oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
$sFreenodeNow = $oHttp->send();
if (!$this->todayUpd()) {
return false;
}
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
$sFreenodeNow = $this->oHttp->send();
$aFreenodeNow = json_decode($sFreenodeNow, 1);
$sTitleSub = $aFreenodeNow['title_sub'];
@ -59,9 +62,12 @@ https://clashfreenode.com/feed/clash-".date('Ymd').".yaml
public function B($aArticle)
{
$oHttp = new Http();
$oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
$sFreenodeNow = $oHttp->send();
if (!$this->todayUpd()) {
return false;
}
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
$sFreenodeNow = $this->oHttp->send();
$aFreenodeNow = json_decode($sFreenodeNow, 1);
$sTitleSub = $aFreenodeNow['title_sub'];
@ -103,6 +109,10 @@ https://clashfreenode.com/feed/clash-".date('Ymd').".yaml
public function C($aArticle)
{
if (!$this->todayUpd()) {
return false;
}
$sContent = "
# 公益免费v2ray节点订阅每小时更新最后更新时间".date('Y-m-d H:i:s')."
@ -146,7 +156,15 @@ https://clashfreenode.com/feed/clash-".date('Ymd').".yaml
public function Test($aArticle)
{
return "test!!!";
if (!$this->todayUpd()) {
return false;
}
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
$sFreenodeNow = $this->oHttp->send();
$aFreenodeNow = json_decode($sFreenodeNow, 1);
return json_encode($aFreenodeNow).time();
}
}