no message

This commit is contained in:
hellcat 2026-08-06 21:38:53 +08:00
parent 274c6d78c7
commit a07d041db7

View File

@ -134,19 +134,41 @@ public function receiveShadowrocketids(Request $oRequest)
$oCategories = Categories::where("sSlug", "shadowrocketids")->first(); $oCategories = Categories::where("sSlug", "shadowrocketids")->first();
$oArticle = Articles::where('sSlug', $sSlug)->first();
$aAttributes = [
'sThumb' => $sThumbPath,
'iCategoryId' => $oCategories->id,
'sTitle' => '「'.date("n月j日").'」'.$sTitle,
'sTitleSub' => $sTitleSub,
'sContent' => $sArticle,
'iStatus' => 1,
'iUserId' => 1,
];
// 只有新创建时才写入初始点赞数
if (!$oArticle) {
$aAttributes['i7like'] = $i7like;
}
$oArticle = Articles::updateOrCreate( $oArticle = Articles::updateOrCreate(
['sSlug' => $sSlug], ['sSlug' => $sSlug],
[ $aAttributes
'sThumb' => $sThumbPath, );
'iCategoryId' => $oCategories->id,
'sTitle' => $sTitle, // $oArticle = Articles::updateOrCreate(
'sTitleSub' => $sTitleSub, // ['sSlug' => $sSlug],
'sContent' => $sArticle, // [
'i7like' => $i7like, // 'sThumb' => $sThumbPath,
'iStatus' => 1, // 'iCategoryId' => $oCategories->id,
'iUserId' => 1, // 'sTitle' => $sTitle,
], // 'sTitleSub' => $sTitleSub,
); // 'sContent' => $sArticle,
// 'i7like' => $i7like,
// 'iStatus' => 1,
// 'iUserId' => 1,
// ],
// );
(new TagService())->syncArticleTagsByName($oArticle, $aArticleTags); (new TagService())->syncArticleTagsByName($oArticle, $aArticleTags);