本次更新
1.domain 增加了几个字段,已经 backup, 2.视图模板,替换模板分组,替换模板 数据增加了seed 播种 3. 标记了TODO
This commit is contained in:
@@ -7,7 +7,7 @@ use think\template\TagLib;
|
||||
class Site extends TagLib
|
||||
{
|
||||
protected $tags = [
|
||||
|
||||
'cfg' => ['attr' => 'code,encode', 'close' => 0],
|
||||
'wz' => ['attr' => 'wz', 'close' => 0],
|
||||
'nurl' => ['attr' => 'n_id', 'close' => 0],
|
||||
'grm' => ['attr' => 'domain,code,line,diff', 'close' => 0],
|
||||
@@ -15,7 +15,30 @@ class Site extends TagLib
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* cfg 标签处理函数-系统配置
|
||||
*
|
||||
* @param array $tag
|
||||
* @param string $content
|
||||
* @return string
|
||||
*/
|
||||
public function tagCfg($tag)
|
||||
{
|
||||
$code = isset($tag['code']) ? $tag['code'] : '';
|
||||
$encode = isset($tag['encode']) ? $tag['encode'] : 'false';
|
||||
|
||||
$parse = <<<EOD
|
||||
<?php
|
||||
\$strCfgVal = \\app\\model\\SystemConfigModel::getValByCode("{$code}");
|
||||
if ("{$encode}" === "true") {
|
||||
echo customEntities(\$strCfgVal);
|
||||
} else {
|
||||
echo \$strCfgVal;
|
||||
}
|
||||
?>
|
||||
EOD;
|
||||
return $parse;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文字处理函数
|
||||
|
||||
Reference in New Issue
Block a user