no message
This commit is contained in:
parent
292a5e53ab
commit
42457e5c85
@ -28,7 +28,8 @@ class TestsController
|
||||
|
||||
//test
|
||||
// $s = "\/AticleSet__1115zz__sale_rate 1118.118";
|
||||
$s = "\/test#cron__i 07";
|
||||
$s = "\/git#LastTime 1";
|
||||
// $s= "/test#cron__i 07";
|
||||
|
||||
$oHttp = new Http();
|
||||
$oHttp->sMethod = "post";
|
||||
|
||||
@ -105,7 +105,7 @@ https://clashfreenode.com/feed/clash-".date('Ymd').".yaml
|
||||
|
||||
$sContent = "
|
||||
|
||||
# 公益免费v2ray节点订阅 每日更新 更新时间 ".date('Y-m-d H:i:s')."
|
||||
# 公益免费v2ray节点订阅,每小时更新,最后更新时间:".date('Y-m-d H:i:s')."
|
||||
|
||||
## 性价比机场推荐:[福云](https://fuuu.cloud)
|
||||
|
||||
@ -127,13 +127,18 @@ clash订阅链接:
|
||||
|
||||
https://clashfreenode.com/feed/clash-".date('Ymd').".yaml
|
||||
|
||||
## 温馨提示
|
||||
## 客户端下载
|
||||
|
||||
本站提供的都是免费且公益的节点,稳定性与长时间连接速率无法与收费版的高速机场节点相提并论,不能奢望太多。
|
||||
|
||||
注意你自己的网络环境(本地连接当中的DNS,手动配置一下:114.114.114.114,8.8.8.8或是其它公共的DNS。)
|
||||
|
||||
如果某个网址无法代理访问,可切换到全局代理模式,一般可解决。
|
||||
| 名称 | 操作系统 | 地址 |
|
||||
|------|----------|------|
|
||||
| SingBox | Mac/Linux/Android/Ios | [https://sing-box.sagernet.org/clients/](https://sing-box.sagernet.org/clients/) |
|
||||
| FlClash | Mac/Linux/Windows/Android | [https://github.com/chen08209/FlClash](https://github.com/chen08209/FlClash) |
|
||||
| Clash Verge | Mac/Linux/Windows | [https://github.com/clash-verge-rev/clash-verge-rev](https://github.com/clash-verge-rev/clash-verge-rev) |
|
||||
| Clash Meta Android | Android | [https://github.com/MetaCubeX/ClashMetaForAndroid](https://github.com/MetaCubeX/ClashMetaForAndroid) |
|
||||
| ClashX Meta | Mac | [https://github.com/MetaCubeX/ClashX.Meta](https://github.com/MetaCubeX/ClashX.Meta) |
|
||||
| V2RayN | Windows | [https://github.com/2dust/v2rayN](https://github.com/2dust/v2rayN) |
|
||||
| V2RayNG | Android | [https://github.com/2dust/v2rayNG](https://github.com/2dust/v2rayNG) |
|
||||
| V2RayU | Mac | [https://github.com/yanue/V2rayU](https://github.com/yanue/V2rayU) |
|
||||
|
||||
";
|
||||
return $sContent;
|
||||
|
||||
20
app/Services/Github/Mod/JichangTuijian.php
Executable file
20
app/Services/Github/Mod/JichangTuijian.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace App\Services\Github\Mod;
|
||||
use App\Services\TomTool\Http;
|
||||
|
||||
class JichangTuijian {
|
||||
|
||||
public $sTitle; // 必须
|
||||
public $sContent; // 必须
|
||||
public $sSubTitle; // 非必须
|
||||
|
||||
public function A($aArticle)
|
||||
{
|
||||
|
||||
$sContent = "test";
|
||||
|
||||
return $sContent;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -19,23 +19,20 @@ class Git extends Base {
|
||||
}
|
||||
|
||||
// 获取远程更新
|
||||
$fetchOutput = $this->runCommand('git fetch origin');
|
||||
if (empty($fetchOutput)) {
|
||||
throw new \Exception("获取远程更新失败,输出为空。");
|
||||
}
|
||||
$this->runCommand('git fetch origin');
|
||||
|
||||
// 获取最后提交的时间
|
||||
$lastCommitTime = $this->runCommand('git log -1 --format=%cd origin/main');
|
||||
$lastCommitTime = $this->runCommand('git log origin/main -1 --format=%cd');
|
||||
$lastCommitTime = \DateTime::createFromFormat('D M d H:i:s Y O', $lastCommitTime[0]);
|
||||
$lastCommitTime = json_encode($lastCommitTime->format('Y-m-d H:i:s'));
|
||||
|
||||
// 检查是否获取到时间
|
||||
if (empty($lastCommitTime)) {
|
||||
throw new \Exception("无法获取最后提交时间,可能是分支不存在或没有提交。");
|
||||
}
|
||||
|
||||
// 发送最后更新时间到 Telegram
|
||||
$this->oTGHttp->sendToTG("最后更新时间: " . trim($lastCommitTime));
|
||||
return $lastCommitTime;
|
||||
|
||||
$this->oHttp::response(200, 'ok');
|
||||
}
|
||||
|
||||
// 没用
|
||||
@ -104,13 +101,14 @@ class Git extends Base {
|
||||
exec($command, $output, $returnVar);
|
||||
|
||||
if ($returnVar !== 0) {
|
||||
// 将输出数组转换为 JSON 格式
|
||||
$jsonOutput = json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$errorMessage = "命令失败: $command\n" . $jsonOutput . "\n";
|
||||
|
||||
throw new \Exception($errorMessage);
|
||||
} else {
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user