开始官网模板

This commit is contained in:
augushong
2020-04-19 13:18:57 +08:00
parent 1ec8c07250
commit 9910dd3e6d
42 changed files with 1435 additions and 219 deletions

View File

@@ -69,8 +69,38 @@ php think reset_password
- 后台日志
- 支持轮播图,导航,小程序导航(打开方式)等设置
- 实现CMS后台
- 支持前台多主题
- 适配手机端,实现table转卡片样式
#### 多主题用法
在index应用下,使用`$this->fetch($template,$vars)`,而不要用`View::fetch($template,$vars)`.
多主题用法仅当`$template`为空字符串或者字符串有效,使用`跨应用`,`跨控制器`,`木板路径`,`数据内容`的写法无效.
index应用下控制器有个`BaseController.php`,里面有个属性`$isUseTpls = true`,当关闭时不使用多主题.
多主题规则,系统设置的`index_tpl_name`拼接`$template`;
例如下:
假设是`Index`控制器,`index`方法,系统设置的`index_tpl_name`值为`easy_blue_`,模板命名规则和模板目录均为默认情况下.
```
$this->fetch();
// 定位模板为:/view/index/index/easy_blue_index.html
$this->fetch('index');
// 定位模板为:/view/index/index/easy_blue_index.html
$this->fetch('index_1');
// 定位模板为:/view/index/index/easy_blue_index_1.html
$this->fetch('index_product');
// 定位模板为:/view/index/index/easy_blue_index_product.html
```
> 配置文件下的模板命名规则和模板位置仍然按有效,默认在`/view`将方法名转下划线的写法.这些配置仍然有效;
### 完整安装