diff --git a/app/Http/Controllers/CronController.php b/app/Http/Controllers/CronController.php index e76974e..efa1dc4 100755 --- a/app/Http/Controllers/CronController.php +++ b/app/Http/Controllers/CronController.php @@ -24,7 +24,6 @@ class CronController public function index() { try { - $h = date("H"); $i = date("i"); $s = date("s"); diff --git a/app/Services/Github/Github.php b/app/Services/Github/Github.php index 025e5c9..87b51fa 100644 --- a/app/Services/Github/Github.php +++ b/app/Services/Github/Github.php @@ -13,7 +13,8 @@ class Github { if (method_exists($sClass, $sFunc)) { $oInstans = new $sClass(); - $oInstans->aHuodong = self::GetHuodong($aArticle); +// $oInstans->aHuodong = self::GetHuodong($aArticle); + $oInstans->aShip = self::GetShip($aArticle); $sReadMe = $oInstans->$sFunc($aArticle); return $sReadMe; } else { @@ -24,34 +25,60 @@ class Github { } - public static function GetHuodong($aArticle) + public static function GetShip($aArticle) { - $oHttp = new Http(); $sDateNow = date("Y-m-d"); -// $sDateNow = "2025-05-03"; - $sHuodongUrl = env('api_url_jichang_base').'/'.'api/huodong/findbydate/'.$sDateNow; - $sHuodong = $oHttp->send($sHuodongUrl); - $oHuodong = json_decode($sHuodong, 1); + $sMasterUrl = "https://".env("www_master")."/api/ship/get/fuc/github/".$aArticle["user_name"]."-".$aArticle["project_name"]; - $sHuodongStr = "购买套餐时输入【".$aArticle['sale_code']."】优惠码,可享".$aArticle['sale_rate']."折优惠,折后低至8元/月。"; + $sShip = $oHttp->send($sMasterUrl); + $aShip = json_decode($sShip, true); - if ($oHuodong) { - $sStartDateStr = date("n月j日", strtotime($oHuodong['start_date'])); - $sEndDateStr = date("n月j日", strtotime($oHuodong['end_date'])); - - $sHuodongStr .= " - -🎁 ".$oHuodong['title'].":".$sStartDateStr."至".$sEndDateStr."期间,".$oHuodong['content']; - + $aShip["youhui_str"] = "购买套餐时输入【".$aArticle['sale_code']."】优惠码,可享".$aArticle['sale_rate']."折优惠,折后低至8元/月。"; + + if ($aShip["huodong"]["str"]) { + $aShip["youhui_str"] .= " + +".$aShip["huodong"]["str"]; } - $oHuodong['str'] = $sHuodongStr; - - return $oHuodong; +// tomd(empty($aShip["huodong"]["str"]), 1); +// tomd($aShip, 1); + return $aShip; } + +// public static function GetHuodong($aArticle) +// { +// +// $oHttp = new Http(); +// +// $sDateNow = date("Y-m-d"); +//// $sDateNow = "2025-05-03"; +// +// $sHuodongUrl = env('api_url_jichang_base').'/'.'api/huodong/findbydate/'.$sDateNow; +// $sHuodong = $oHttp->send($sHuodongUrl); +// $oHuodong = json_decode($sHuodong, 1); +// +// $sHuodongStr = "购买套餐时输入【".$aArticle['sale_code']."】优惠码,可享".$aArticle['sale_rate']."折优惠,折后低至8元/月。"; +// +// if ($oHuodong) { +// $sStartDateStr = date("n月j日", strtotime($oHuodong['start_date'])); +// $sEndDateStr = date("n月j日", strtotime($oHuodong['end_date'])); +// +// $sHuodongStr .= " +// +//🎁 ".$oHuodong['title'].":".$sStartDateStr."至".$sEndDateStr."期间,".$oHuodong['content']; +// +// } +// +// $oHuodong['str'] = $sHuodongStr; +// +// return $oHuodong; +// +// } + } diff --git a/app/Services/Github/Mod/Base.php b/app/Services/Github/Mod/Base.php index a9038e9..6304e0f 100755 --- a/app/Services/Github/Mod/Base.php +++ b/app/Services/Github/Mod/Base.php @@ -5,8 +5,9 @@ use App\Services\TomTool\Http; class Base { public $oHttp; - public $oHuodong; - public $sHuodongStr; + public $oHuodong; // 没用了 + public $sHuodongStr; // 没用了 + public $aShip; public $aArticle; public function __construct() diff --git a/app/Services/Github/Mod/FreeNode.php b/app/Services/Github/Mod/FreeNode.php index a95ba6e..32e1937 100755 --- a/app/Services/Github/Mod/FreeNode.php +++ b/app/Services/Github/Mod/FreeNode.php @@ -4,11 +4,14 @@ use App\Services\TomTool\Http; class FreeNode extends Base { - public $aHuodong; // 必须,注入 + public $aHuodong; // 必须,注入,没用了 + public $aShip; public function A($aArticle) { +// tomd($this->aShip, 1); + if (!$this->todayUpd()) { return false; } @@ -21,27 +24,27 @@ $sContent = " ".date("Y年m月d日").$aArticleFreenode['title_sub']." -## 性价比机场推荐:[福云](https://fuuu.cloud) +## 性价比机场推荐:[".$this->aShip["name"]."](https://".$this->aShip["www"].") * 价格低 - 目前七折优惠,折后低至8元。 * 速度快 - 晚高峰看youtube高清不卡顿。 -* 稳定 - 稳定运营二年多,海外团队。 +* 稳定 - 海外团队稳定运营第3年。 -".$this->aHuodong['str']." +".$this->aShip['youhui_str']." -点击进入[福云机场官网](https://fuuu.cloud)。 +点击进入[".$this->aShip["name"]."机场官网](https://".$this->aShip["www"].")。 ## 免费节点订阅链接 v2ray订阅链接: -https://clashfreenode.com/feed/v2ray-".date('Ymd').".txt +https://".$aArticle["fn_www"]."/feed/v2ray-".date('Ymd').".txt clash订阅链接: -https://clashfreenode.com/feed/clash-".date('Ymd').".yaml +https://".$aArticle["fn_www"]."/feed/clash-".date('Ymd').".yaml ## 温馨提示