This commit is contained in:
Default
2025-04-21 22:32:40 +08:00
parent 52236ab6f7
commit f21ece4de1
8 changed files with 204 additions and 80 deletions

View File

@@ -158,9 +158,9 @@ class SiteContext
* @param string $strDiff
* @return string
*/
public function converterTemplate(string $strCode,string $strDiff="0"): string
public function converterTemplate(string $strCode, string $strDiff = "0"): string
{
$strTitleTemplate = $this->DomainModel->getFomartSubject($strCode,$strDiff);
$strTitleTemplate = $this->DomainModel->getFomartSubject($strCode, $strDiff);
return ConverterMovel::convert($strTitleTemplate);
}
@@ -262,4 +262,16 @@ class SiteContext
return $arrResult;
}
/**
* 视图反向控制器(注释函数),在视图开头调用,用来初始化一些操作。这里尽量不要复杂逻辑。这是个样例
*
* @return void
*/
public function initHomeTKD()
{
ConverterMovel::setVal([
'strSiteName' => $this->DomainModel->d_name,
]);
}
}