🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
### 例 * * * * * + 例1 ~~~ //如果未最终缓存过文件 if (!$this->showed('index')) { //开启布局 $this->layout(true); //如果没有展示过index if (!$this->displayed('index')) { $model = new home\model\Index(); $data = $model->getModuleInfo(); //添加变量,缓存并只为html文本 $this->assign('indexModule',$data,true,true); } //展示并拼装为最终模版 $this->display('index')->assemble('index',true); } //展示页面 $this->show('index'); ~~~ * * * * * + 例2 ~~~ //静态页面时间3600秒,布局关闭 $this->staticHtml(3600)->layout(false); //展示过或者拼接页面 $this->showed('login') || $this->display('head') ->display('logo') ->display('login') ->display('footer-bottom') ->display('end') ->assemble('login'); //展示页面 $this->show('login'); ~~~