no message
This commit is contained in:
parent
e79bdc8123
commit
46f37caa42
@ -30,4 +30,44 @@ class GithubController extends Controller
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 始终返回数据,今天没有就是前一天,前一天没有就是异常情况
|
||||
public function getFnToday($sDate = false)
|
||||
{
|
||||
if (!$sDate) {
|
||||
$sDate = date("Ymd");
|
||||
}
|
||||
|
||||
$sCode = $sDate;
|
||||
|
||||
//// test
|
||||
// 20250721 - 23 有数据
|
||||
// $sCode = "20250720";
|
||||
|
||||
$bUpd = Article::where("code", $sCode)->exists();
|
||||
|
||||
if ($bUpd === true) {
|
||||
$sCodeTrue = $sCode;
|
||||
} else {
|
||||
$sCodeTrue = date("Ymd", strtotime("-1 day"));
|
||||
}
|
||||
|
||||
$sFilePathClash = "feed/clash-".$sCodeTrue.".yaml";
|
||||
$sFilePathV2ray = "feed/v2ray-".$sCodeTrue.".txt";
|
||||
|
||||
$sFileClash = file_get_contents($sFilePathClash);
|
||||
$sFileV2ray = file_get_contents($sFilePathV2ray);
|
||||
|
||||
$aData = [
|
||||
"code" => "100",
|
||||
"clash" => $sFileClash,
|
||||
"v2ray" => $sFileV2ray
|
||||
];
|
||||
|
||||
echo json_encode($aData);
|
||||
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -250,7 +250,8 @@ class ExecController extends Controller
|
||||
|
||||
}
|
||||
|
||||
// 免费节点每日更新
|
||||
//// 免费节点每日更新
|
||||
// 如果来源没更新,这里也完全不更新
|
||||
public function freenodeUp($sTimeSet = "0", $bFnOnly = false) {
|
||||
|
||||
echo "\n#start# article fn up \n";
|
||||
@ -307,6 +308,7 @@ class ExecController extends Controller
|
||||
|
||||
//// 生成订阅 end
|
||||
|
||||
// 如果已经有文章入库,就改成指更新免费节点文件,因为他有事会先给你假的,得一直更新
|
||||
if ($bFnOnly === true) {
|
||||
echo "only fn";
|
||||
return;
|
||||
|
||||
@ -50,3 +50,4 @@ Route::get('/helper/like/get/{id}', [HelperController::class, 'likeGet']); //
|
||||
|
||||
Route::get('/api/github/todayupd', [GithubController::class, 'todayUpd']);
|
||||
Route::get('/api/github/getlast', [GithubController::class, 'getLast']);
|
||||
Route::get('/api/github/getfntoday/{date?}', [GithubController::class, 'getFnToday']);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user