thinkphp\library\think\view\driver\Think.php
修改
public function __construct($config =[])
{
$this->config = array_merge($this->config, $config);
if (empty($this->config['view_path'])) {
$this->config['view_path'] = App::$modulePath . 'view' . DS;
}
if (!empty($this->config['theme_name'])) {
$this->config['view_path'] .= $this->config['theme_name'] . DS;
}
$this->template = new Template($this->config);
}
然后config.php的template里追加
'template' => [
'view_path' => './template/admin/',
'theme_name' =>'default',
],
有疑问的可以加群162092974咨询