no message

This commit is contained in:
hellcat 2025-07-02 16:47:32 +08:00
parent b391749d53
commit 5bbea88e1a
4 changed files with 59 additions and 29 deletions

View File

@ -24,7 +24,6 @@ class CronController
public function index() public function index()
{ {
try { try {
$h = date("H"); $h = date("H");
$i = date("i"); $i = date("i");
$s = date("s"); $s = date("s");

View File

@ -13,7 +13,8 @@ class Github {
if (method_exists($sClass, $sFunc)) { if (method_exists($sClass, $sFunc)) {
$oInstans = new $sClass(); $oInstans = new $sClass();
$oInstans->aHuodong = self::GetHuodong($aArticle); // $oInstans->aHuodong = self::GetHuodong($aArticle);
$oInstans->aShip = self::GetShip($aArticle);
$sReadMe = $oInstans->$sFunc($aArticle); $sReadMe = $oInstans->$sFunc($aArticle);
return $sReadMe; return $sReadMe;
} else { } else {
@ -24,34 +25,60 @@ class Github {
} }
public static function GetHuodong($aArticle) public static function GetShip($aArticle)
{ {
$oHttp = new Http(); $oHttp = new Http();
$sDateNow = date("Y-m-d"); $sDateNow = date("Y-m-d");
// $sDateNow = "2025-05-03";
$sHuodongUrl = env('api_url_jichang_base').'/'.'api/huodong/findbydate/'.$sDateNow; $sMasterUrl = "https://".env("www_master")."/api/ship/get/fuc/github/".$aArticle["user_name"]."-".$aArticle["project_name"];
$sHuodong = $oHttp->send($sHuodongUrl);
$oHuodong = json_decode($sHuodong, 1);
$sHuodongStr = "购买套餐时输入【".$aArticle['sale_code']."】优惠码,可享".$aArticle['sale_rate']."折优惠折后低至8元/月。"; $sShip = $oHttp->send($sMasterUrl);
$aShip = json_decode($sShip, true);
if ($oHuodong) { $aShip["youhui_str"] = "购买套餐时输入【".$aArticle['sale_code']."】优惠码,可享".$aArticle['sale_rate']."折优惠折后低至8元/月。";
$sStartDateStr = date("n月j日", strtotime($oHuodong['start_date']));
$sEndDateStr = date("n月j日", strtotime($oHuodong['end_date'])); if ($aShip["huodong"]["str"]) {
$aShip["youhui_str"] .= "
$sHuodongStr .= "
".$aShip["huodong"]["str"];
🎁 ".$oHuodong['title']."".$sStartDateStr."".$sEndDateStr."期间,".$oHuodong['content'];
} }
$oHuodong['str'] = $sHuodongStr; // tomd(empty($aShip["huodong"]["str"]), 1);
// tomd($aShip, 1);
return $oHuodong;
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;
//
// }
} }

View File

@ -5,8 +5,9 @@ use App\Services\TomTool\Http;
class Base { class Base {
public $oHttp; public $oHttp;
public $oHuodong; public $oHuodong; // 没用了
public $sHuodongStr; public $sHuodongStr; // 没用了
public $aShip;
public $aArticle; public $aArticle;
public function __construct() public function __construct()

View File

@ -4,11 +4,14 @@ use App\Services\TomTool\Http;
class FreeNode extends Base { class FreeNode extends Base {
public $aHuodong; // 必须,注入 public $aHuodong; // 必须,注入,没用了
public $aShip;
public function A($aArticle) public function A($aArticle)
{ {
// tomd($this->aShip, 1);
if (!$this->todayUpd()) { if (!$this->todayUpd()) {
return false; return false;
} }
@ -21,27 +24,27 @@ $sContent = "
".date("Y年m月d日").$aArticleFreenode['title_sub']." ".date("Y年m月d日").$aArticleFreenode['title_sub']."
## 性价比机场推荐:[福云](https://fuuu.cloud) ## 性价比机场推荐:[".$this->aShip["name"]."](https://".$this->aShip["www"].")
* 价格低 - 目前七折优惠折后低至8元。 * 价格低 - 目前七折优惠折后低至8元。
* 速度快 - 晚高峰看youtube高清不卡顿。 * 速度快 - 晚高峰看youtube高清不卡顿。
* 稳定 - 稳定运营二年多,海外团队 * 稳定 - 海外团队稳定运营第3年
".$this->aHuodong['str']." ".$this->aShip['youhui_str']."
点击进入[福云机场官网](https://fuuu.cloud) 点击进入[".$this->aShip["name"]."机场官网](https://".$this->aShip["www"].")
## 免费节点订阅链接 ## 免费节点订阅链接
v2ray订阅链接 v2ray订阅链接
https://clashfreenode.com/feed/v2ray-".date('Ymd').".txt https://".$aArticle["fn_www"]."/feed/v2ray-".date('Ymd').".txt
clash订阅链接 clash订阅链接
https://clashfreenode.com/feed/clash-".date('Ymd').".yaml https://".$aArticle["fn_www"]."/feed/clash-".date('Ymd').".yaml
## 温馨提示 ## 温馨提示