1、完善前端模板功能

2、完善伪静态规则设置
This commit is contained in:
2020-04-17 16:46:32 +08:00
parent ce9b63dda1
commit 83ce571a3f
6 changed files with 135 additions and 57 deletions

View File

@@ -33,6 +33,15 @@ class Base extends BaseC {
$this->tpl_config['view_depr'] = '/';
$this->tpl_config['view_dir_name'] = 'addons' . DIRECTORY_SEPARATOR . $this->request->param('addon') . DIRECTORY_SEPARATOR . 'view';
}
$template_path = str_replace("public", "", $this->tpl_config['view_dir_name']);
$this->tpl_config['tpl_replace_string'] = [
'__static__' => '/static',
'__img__' => $template_path . DIRECTORY_SEPARATOR . 'static/images',
'__css__' => $template_path . DIRECTORY_SEPARATOR . 'static/css',
'__js__' => $template_path . DIRECTORY_SEPARATOR . 'static/js',
'__plugins__' => '/static/plugins',
'__public__' => $template_path . DIRECTORY_SEPARATOR . 'static',
];
View::config($this->tpl_config);
View::assign($this->data);