set('name', 'index') ->import('inc/head') # 各个板块的标题 ->fetch(array('.main-product .title', 0), '<{Dever::load("main/content.getMenuName", "course")}>') ->fetch(array('.main-service .title', 0), '<{Dever::load("main/content.getMenuName", "teacher")}>') ->fetch(array('.main-news .title', 0), '<{Dever::load("main/content.getMenuName", "news")}>') # 轮播图 ->loop ( '#banner .carousel-item-one', 'main/content.focus', array ( 'img' => array ( 'src' => '$v.pic', 'title' => '$v.name', 'alt' => '$v.name', ), '.title' => array ( 'html' => '$v.name', ), '.desc' => array ( 'html' => '$v.desc', ), ) ) # 课程管理 ->loop ( '.main-product .layui-col-sm6', 'main/content.course', array ( 'img' => array ( 'src' => '$v.icon', 'title' => '$v.name', 'alt' => '$v.name', 'width' => '60px', ), '.label' => array ( 'html' => '$v.name', ), 'p|1' => array ( 'html' => '$v.desc', ), 'a' => array ( 'href' => '$v.link', ), ) ) # 讲师 ->loop ( '.main-service .layui-col-sm6', 'main/content.teacher', array ( 'img' => array ( 'src' => '$v.index_pic', 'title' => '$v.name', 'alt' => '$v.name', 'width' => '280px', ), '.label' => array ( 'html' => '$v.name', ), 'p|1' => array ( 'html' => '$v.short_desc', ), '.content' => array ( 'onclick' => 'location.href=\'<{$v.link}>\'', 'style' => 'cursor:pointer', ), ) ) # 动态 ->loop ( '.main-news .content', 'main/content.news', array ( 'img' => array ( 'src' => '$v.pic_cover', 'title' => '$v.name', 'alt' => '$v.name', 'width' => '280px', ), '.detail span' => array ( 'html' => '$v.desc', ), 'a|0' => array ( 'href' => '$v.link', 'title' => '$v.name', 'alt' => '$v.name', ), 'a|2' => array ( 'href' => '$v.link', 'title' => '$v.name', 'alt' => '$v.name', ), 'a|1' => array ( 'href' => '$v.link', 'title' => '$v.name', 'alt' => '$v.name', 'html' => '$v.name', ), '.num' => array ( 'style' => 'display:none;', ), '.time' => array ( 'html' => '$v.date', ), ) ) ->import('inc/foot') ->display();