no message
This commit is contained in:
parent
42457e5c85
commit
f55ce265d8
@ -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());
|
file_put_contents($this->sProjectPath."/version.text", time());
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
|
|||||||
@ -28,8 +28,8 @@ class TestsController
|
|||||||
|
|
||||||
//test
|
//test
|
||||||
// $s = "\/AticleSet__1115zz__sale_rate 1118.118";
|
// $s = "\/AticleSet__1115zz__sale_rate 1118.118";
|
||||||
$s = "\/git#LastTime 1";
|
// $s = "\/git#LastTime 1";
|
||||||
// $s= "/test#cron__i 07";
|
$s= "/test#cron__i 07";
|
||||||
|
|
||||||
$oHttp = new Http();
|
$oHttp = new Http();
|
||||||
$oHttp->sMethod = "post";
|
$oHttp->sMethod = "post";
|
||||||
|
|||||||
26
app/Services/Github/Mod/Base.php
Executable file
26
app/Services/Github/Mod/Base.php
Executable 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
namespace App\Services\Github\Mod;
|
namespace App\Services\Github\Mod;
|
||||||
use App\Services\TomTool\Http;
|
use App\Services\TomTool\Http;
|
||||||
|
|
||||||
class FreeNode {
|
class FreeNode extends Base {
|
||||||
|
|
||||||
public $sTitle; // 必须
|
public $sTitle; // 必须
|
||||||
public $sContent; // 必须
|
public $sContent; // 必须
|
||||||
@ -11,9 +11,12 @@ class FreeNode {
|
|||||||
public function A($aArticle)
|
public function A($aArticle)
|
||||||
{
|
{
|
||||||
|
|
||||||
$oHttp = new Http();
|
if (!$this->todayUpd()) {
|
||||||
$oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
|
return false;
|
||||||
$sFreenodeNow = $oHttp->send();
|
}
|
||||||
|
|
||||||
|
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
|
||||||
|
$sFreenodeNow = $this->oHttp->send();
|
||||||
$aFreenodeNow = json_decode($sFreenodeNow, 1);
|
$aFreenodeNow = json_decode($sFreenodeNow, 1);
|
||||||
$sTitleSub = $aFreenodeNow['title_sub'];
|
$sTitleSub = $aFreenodeNow['title_sub'];
|
||||||
|
|
||||||
@ -59,9 +62,12 @@ https://clashfreenode.com/feed/clash-".date('Ymd').".yaml
|
|||||||
|
|
||||||
public function B($aArticle)
|
public function B($aArticle)
|
||||||
{
|
{
|
||||||
$oHttp = new Http();
|
if (!$this->todayUpd()) {
|
||||||
$oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
|
return false;
|
||||||
$sFreenodeNow = $oHttp->send();
|
}
|
||||||
|
|
||||||
|
$this->oHttp->sToUrl = env('api_url_freenode_base').'/'.'api/github/getlast';
|
||||||
|
$sFreenodeNow = $this->oHttp->send();
|
||||||
$aFreenodeNow = json_decode($sFreenodeNow, 1);
|
$aFreenodeNow = json_decode($sFreenodeNow, 1);
|
||||||
$sTitleSub = $aFreenodeNow['title_sub'];
|
$sTitleSub = $aFreenodeNow['title_sub'];
|
||||||
|
|
||||||
@ -103,6 +109,10 @@ https://clashfreenode.com/feed/clash-".date('Ymd').".yaml
|
|||||||
public function C($aArticle)
|
public function C($aArticle)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (!$this->todayUpd()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$sContent = "
|
$sContent = "
|
||||||
|
|
||||||
# 公益免费v2ray节点订阅,每小时更新,最后更新时间:".date('Y-m-d H:i:s')."
|
# 公益免费v2ray节点订阅,每小时更新,最后更新时间:".date('Y-m-d H:i:s')."
|
||||||
@ -146,7 +156,15 @@ https://clashfreenode.com/feed/clash-".date('Ymd').".yaml
|
|||||||
|
|
||||||
public function Test($aArticle)
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user