|
...
|
...
|
@@ -22,7 +22,7 @@ class CreateHtmlService |
|
|
|
|
|
|
|
// 根据项目和路由信息返回的结果确定当前页面使用5.0还是6.0的页面;
|
|
|
|
if ($project && $page_info) {
|
|
|
|
$html = $this->getHtmlV6();
|
|
|
|
$html = $this->getHtmlV6($page_info['master_lang'], $lang = [], $page = 0);
|
|
|
|
} else {
|
|
|
|
$html = $this->getHtmlV5();
|
|
|
|
}
|
|
...
|
...
|
@@ -43,12 +43,14 @@ class CreateHtmlService |
|
|
|
* 返回6.0页面最终HTML
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getHtmlV6()
|
|
|
|
public function getHtmlV6($master_lang, $lang = [], $page = 0)
|
|
|
|
{
|
|
|
|
// 初始化后续需要渲染页面需要的数据 路由、主语种、tdk、嵌入等信息
|
|
|
|
|
|
|
|
$origin_html = $this->originHtml();
|
|
|
|
$html = $this->renderData($origin_html);
|
|
|
|
$html = $this->renderData($origin_html, $page);
|
|
|
|
$html = $this->plugHead($html);
|
|
|
|
$html = $this->processFinal($html);
|
|
|
|
/** ... 调用其他方法, 直至返回完整的正确的HTML */
|
|
|
|
return $html;
|
|
|
|
}
|
|
...
|
...
|
@@ -76,9 +78,9 @@ class CreateHtmlService |
|
|
|
|
|
|
|
/**
|
|
|
|
* 补充其他信息
|
|
|
|
* TDK a链接 mate信息等
|
|
|
|
* @param string $html
|
|
|
|
* @return string
|
|
|
|
* TDK mate信息等
|
|
|
|
* @param $html
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function plugHead($html)
|
|
|
|
{
|
|
...
|
...
|
@@ -102,7 +104,7 @@ class CreateHtmlService |
|
|
|
* @param string $html
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function renderData($html)
|
|
|
|
public function renderData($html, $page)
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* 根据可视化HTML中关键词渲染数据
|
...
|
...
|
|