set('name', 'article') ->set('title', 'main/content.view#name') ->import('inc/head') ->fetch('body@test', '1') ->fetch(array('.common-tit span', 0), 'main/content.view#sname') ->fetch(array('.common-tit em', 0), 'main/content.view#pdate_string') ->fetch(array('.common-tit span', 1), 'main/content.view#sname') ->fetch(array('.common-tit em', 1), 'main/content.view#pdate_string') ->fetch(array('.article-wrapper img@src', 2), 'main/content.view#pic') ->fetch(array('.article-wrapper img@style', 2), 'main/content.view_pic', 'none') ->fetch(array('.article-content .article', 0), 'main/content.view#content') ->fetch(array('.btn-link@data-clipboard-text', 0), 'main/content.view#link') # 页面上部视频 仅限视频模板 ->fetch(array('.video-module@style', 0), 'main/content.view_video_1', 'none') ->fetch(array('.article-wrapper img@src', 0), 'main/content.view#pic') ->fetch(array('.article-wrapper img@src', 1), 'main/content.view#pic') ->fetch(array('.icon-play@data-url', 0), 'main/content.view#video_link') # 页面下部视频 仅限除视频之外的模板 ->fetch(array('.article-video@style', 0), 'main/content.view_video_2', 'none') ->fetch(array('.article-video img@src', 0), 'main/content.view#content_video_pic') ->fetch(array('.article-video img@src', 1), 'main/content.view#content_video_pic') ->fetch(array('.icon-play@data-url', 1), 'main/content.view#video_link') # 标签 ->fetch('.tags h5', 'main/content.view#tag_name') ->fetch('.tags@style', 'main/content.view_tag', 'none') ->loop ( '.tags li', 'main/content.view_tag', array ( 'a|0' => array ( 'href' => '$v.link', 'title' => '$v.name', 'html' => '$v.name', ), ) ) # 热门推荐 ->loop ( '.article-recs li', 'main/content.hot', array ( 'a|0' => array ( 'href' => '$v.link', 'title' => '$v.name', 'img' => array ( 'src' => '$v.pic', 'alt' => '$v.name', ), ), 'a|1' => array ( 'href' => '$v.link', 'title' => '$v.name', 'html' => '$v.name', ), ) ) ->fetch('.article-recs@style', 'main/content.hot', 'none') # 广告 ->loop ( '.ad-swiper .swiper-slide', 'main/content.ad|key=news_view_ad&name=资讯详情页广告', array ( 'a' => array ( 'href' => '$v.link', 'title' => '$v.name', ), 'img' => array ( 'src' => '$v.pic', 'alt' => '$v.name', ), ) ) ->fetch('.ad-swiper@style', 'main/content.ad?key=news_view_ad&name=资讯详情页广告', 'none') ->import('inc/foot') ->display();