no message

This commit is contained in:
hellcat committed 2026-09-10 18:25:15 +08:00
1 parent b96180f732
commit ac86e4e481
10 files changed
+359 -86

No files matched your search

@@ -12,6 +12,7 @@
use App\Models\ArticleThumbNum;
use App\Services\TomTool\HttpV2;
use App\Services\TagService;
use App\Services\IndexNowService;
class ArticlesController extends Controller
{
@@ -83,15 +84,10 @@ public function receive(Request $oRequest)
$oArticle->save();
(new TagService())->syncArticleTagsByName($oArticle, $aOptTag);
// $aArticle = $oArticle->toArray();
// unset($aArticle["sContent"]);
// unset($aArticle["sTitleSub"]);
// $jArticle = json_encode($aArticle, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
$sMsg = "文章put成功:{$oArticle->sSlug}";
TeleSlave::notify()->send($sMsg);
return [
"isDone" => true,
];
@@ -155,20 +151,6 @@ public function receiveShadowrocketids(Request $oRequest)
['sSlug' => $sSlug],
$aAttributes
);
// $oArticle = Articles::updateOrCreate(
// ['sSlug' => $sSlug],
// [
// 'sThumb' => $sThumbPath,
// 'iCategoryId' => $oCategories->id,
// 'sTitle' => $sTitle,
// 'sTitleSub' => $sTitleSub,
// 'sContent' => $sArticle,
// 'i7like' => $i7like,
// 'iStatus' => 1,
// 'iUserId' => 1,
// ],
// );
(new TagService())->syncArticleTagsByName($oArticle, $aArticleTags);
@@ -176,7 +158,10 @@ public function receiveShadowrocketids(Request $oRequest)
$sArticleUrl = config("app.url")."/shadowrocketids/".$sSlug;
TeleSlave::notify()->send($sArticleUrl." 发布成功");
$oIndexNow = new IndexNowService();
$bIndexR = $oIndexNow->pushUrls([$sArticleUrl.".html"]);
TeleSlave::notify()->send($sArticleUrl." 发布成功 | "."indexNow推送:".$bIndexR);
return response()->json($oFlow->done());
}
@@ -241,27 +226,16 @@ public function receiveFreenode(Request $oRequest)
$aAttributes
);
// $oArticle = Articles::updateOrCreate(
// ['sSlug' => $sSlug],
// [
// 'sThumb' => $sThumbPath,
// 'iCategoryId' => $oCategories->id,
// 'sTitle' => $sArticleTitle,
// 'sTitleSub' => $sArticleTitleSub,
// 'sContent' => $sArticleContent,
// 'i7like' => $i7like,
// 'iStatus' => 1,
// 'iUserId' => 1,
// ],
// ); // 我希望,如果数据已经有了,i7like就不再更新
(new TagService())->syncArticleTagsByName($oArticle, $aArticleTags);
ArticleFreenodeThumbNum::where("author_code", $sSubKey)->update(["num" => $sThumbNumTrue]);
$sArticleUrl = config("app.url")."/feenode/".$sSlug;
TeleSlave::notify()->send($sArticleUrl." 发布成功");
$oIndexNow = new IndexNowService();
$bIndexR = $oIndexNow->pushUrls([$sArticleUrl.".html"]);
TeleSlave::notify()->send($sArticleUrl." 发布成功 | "."indexNow推送:".$bIndexR);
return response()->json($oFlow->done());
}
+14 -1
View File
@@ -3,11 +3,24 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Services\IndexNowService;
class TestController extends Controller
class TestController
{
public function hello()
{
tt("hello");
}
public function test1()
{
$oIndexNow = new IndexNowService();
$a = ["https://clashfreenode.com/a/fn20260910.html"]; // 这个页面实际是存在的,但是跳过了?
$r = $oIndexNow->pushUrls($a);
tt($r);
}
}