no message
This commit is contained in:
parent
b46baee366
commit
451b5f45e9
@ -50,6 +50,9 @@ final class Cron
|
||||
CronFreenodePool::save();
|
||||
CronFreenodeMerge::save();
|
||||
CronFreenodeMerge::baseToSite();
|
||||
}
|
||||
|
||||
if ($h % 3 === 0 && $i === 3) {
|
||||
CronFreenodeSync::run();
|
||||
CronFreenodeSync::nodehub();
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ final class ArticleSchema
|
||||
$sSiteArticleApiUrl = "https://".$sSiteUrlBase.$sSiteArticleApiPath;
|
||||
|
||||
// 直接附加raw就该
|
||||
// $aCmd["_raw"] = $oArticleSchema->toArray();
|
||||
$aCmd["_raw"] = $oArticleSchema->toArray();
|
||||
|
||||
// 附加常规
|
||||
$aCmd["key"] = $sCmdKey;
|
||||
|
||||
@ -33,11 +33,13 @@ final class FnSitePublish
|
||||
"Shadowrocket",
|
||||
"Quantumult",
|
||||
"Clash",
|
||||
"Hiddify",
|
||||
"SingBox",
|
||||
"SSR",
|
||||
"节点",
|
||||
"订阅链接",
|
||||
"免费节点",
|
||||
"v2ray",
|
||||
"V2ray",
|
||||
"SSR",
|
||||
];
|
||||
|
||||
|
||||
@ -116,6 +116,9 @@ final class FreenodePool
|
||||
// $aNode["cipher"] = '"auto'';
|
||||
// }
|
||||
// }
|
||||
if ($aNode["type"] == "anytls") {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($aNode["type"] == "vmess") {
|
||||
if (!isset($aNode["cipher"])) {
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
namespace App\Services\Tg\Hook\Mod;
|
||||
|
||||
use App\Models\ArticleCache as ModelArticleCache;
|
||||
use App\Models\SiteMap as ModelSiteMap;
|
||||
use App\Models\ArticleSchema as ModelArticleSchema;
|
||||
use App\Services\Tg\Hook\Dog;
|
||||
//use App\Services\Article\CacheTg as ServiceArticleCacheTg;
|
||||
@ -26,6 +27,59 @@ class Arma extends Base {
|
||||
return $this->oDog->$sName($aArg[0]);
|
||||
}
|
||||
|
||||
public function new($aParam)
|
||||
{
|
||||
$sSiteGroup = $aParam["aArg"][1] ?? "";
|
||||
// $sSiteCode = $aParam["aArg"][2] ?? "";
|
||||
$sCmdType = "put";
|
||||
|
||||
if ($sSiteGroup == "?") {
|
||||
return "#new [siteGroup]";
|
||||
}
|
||||
|
||||
if (!$sSiteGroup) {
|
||||
return "参数不足";
|
||||
}
|
||||
|
||||
$aOpt = [];
|
||||
if ($sSiteGroup == "fn_b") {
|
||||
$aOpt = [
|
||||
// "sSlug" => "windows8691",
|
||||
"sCategoryName" => "Windows",
|
||||
"iIsTop" => 0,
|
||||
"iLikeCount" => 0,
|
||||
"i7like" => 0,
|
||||
"i365like" => 0,
|
||||
"sTag" => "clash,ssr",
|
||||
];
|
||||
}
|
||||
$sOpt = json_encode($aOpt);
|
||||
|
||||
$sTime = time();
|
||||
|
||||
$oSites = ModelSiteMap::where("group_code", $sSiteGroup)->get();
|
||||
|
||||
$aCmdJson = [];
|
||||
foreach ($oSites as $oSite) {
|
||||
$sKey = "|{$sSiteGroup}|{$oSite->code}|".date("YmdHis", $sTime)."|";
|
||||
$aCmdJson[$sKey] = [
|
||||
"site_code" => $oSite->code,
|
||||
"cmd" => "put",
|
||||
"value" => "",
|
||||
"date" => date("Y-m-d H:i:s", $sTime)
|
||||
];
|
||||
}
|
||||
$sCmdJson = json_encode($aCmdJson);
|
||||
|
||||
$this->oDog->oModelSelf->code = $sSiteGroup.'-'.$sTime;
|
||||
$this->oDog->oModelSelf->group_code = $sSiteGroup;
|
||||
$this->oDog->oModelSelf->cmd = $sCmdJson;
|
||||
$this->oDog->oModelSelf->opt = $sOpt;
|
||||
$this->oDog->oModelSelf->save();
|
||||
|
||||
return $this->toJson($this->oDog->oModelSelf);
|
||||
}
|
||||
|
||||
public function thumbUse($aParam)
|
||||
{
|
||||
$iId = $aParam["aOption"][1] ?? 0;
|
||||
|
||||
@ -20,7 +20,7 @@ class ArticleTemplateFreenode extends Base {
|
||||
$this->oDog = new Dog(new ModelArticleTemplateFreenode());
|
||||
$this->oDog->_setDogName("ArticleTemplateFreenode");
|
||||
// $this->oDog->_setJsonField(["content"]);
|
||||
// $this->oDog->_setStrField(["content"]);
|
||||
$this->oDog->_setStrField(["content"]);
|
||||
$this->aUpdate = $aUpdate;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user