diff --git a/app/Services/Article/Schema.php b/app/Services/Article/Schema.php index e8e31781..c553333c 100755 --- a/app/Services/Article/Schema.php +++ b/app/Services/Article/Schema.php @@ -69,47 +69,6 @@ final class Schema return $oArticleFlow; } - - // 废弃,改直接推了 -// public function api_buildArticle() -// { -// $oFlow = Flow::start("api_buildArticle"); -// -// $sArg = file_get_contents('php://input'); -// $aArg = json_decode($sArg, true); -// -// $sArticleCode = $aArg[""] ?? ''; -// $sSiteCode = $aArg["sSiteCode"] ?? ''; // ffcp -// $sSiteName = $aArg["sSiteName"] ?? ''; // ttcp -// $sSiteUrl = $aArg["sSiteUrl"] ?? ''; // ttcp.com -// $isTest = $aArg["isTest"] ?? false; -// -// $sSiteGroupCode = ModelSiteMap::where("code", $sSiteCode)->first()?->group_code; -// $oArticleSchema = ModelArticleSchema::where("code", $sArticleCode)->first(); -// -// $aArg = [ -// "sArticleCode" => $sArticleCode, -// "sSiteGroupCode"=> $sSiteGroupCode, -// "sSiteCode" => $sSiteCode, -// "sSiteName" => $sSiteName, -// "sSiteUrl" => $sSiteUrl, -// "isTest" => $isTest, -// "aSchema" => json_decode($oArticleSchema->schema, true), -// ]; -// -// $sMethod = "build_article__".$sSiteGroupCode; -// if (method_exists($this, $sMethod)) { -// $oArticleFlow = $this->$sMethod($aArg); -// } else { -// $aResult = $oFlow->fail("没有".$sMethod."的对应处理")->getResult(); -// echo json_encode($aReturn); -// exit; -// } -// -// echo json_encode($oArticleFlow->getResult()); -// exit; -// } - private function build_article__resource() { $oFlow = Flow::start("build_article__resource"); @@ -129,8 +88,11 @@ final class Schema $aSchemaProRow["type"] = $aSchemaDataRow["type"] ?? ''; $aSchemaProRow["data"] = []; // 默认空,等于判断之外的给空 - if ($sSchemaType == "cache_tg") { - if ($this->oArticle->group_code == "tg_xiuren_a") { + if ($sSchemaType == "cache_tg" || $sSchemaType == "cache_tg_new") { + + $sImgHandle = ModelOption::where("k", "cache_tg_new::image_handle")->first()?->v; + + if ($this->oArticle->group_code == "tg_xiuren_a" || $sImgHandle == "xiuren_a") { if ($aSchemaProRow["type"] == "photo") { // $sRowUuid = $sUuid = Str::uuid()->toString();