<?php

$view

->set('name', 'index')

->import('inc/head')

->import('inc/search')

->fetch('#nav-news@href', 'main/data.config#search_link')
->fetch('#nav-home@href', 'main/data.config#index_link')
->fetch('#nav-forum@href', 'main/data.config#vip_link')
->fetch('#nav-my@href', 'main/data.config#user_link')
->fetch('#footer-logo@href', 'main/data.config#submit_link')

# 焦点图
->loop
(
    '.dev-swipe-item',
    'main/data.getPush|key=focus_home&name=首页焦点图&num=3',
    array
    (
    	'self' => '<a href="<{$v.link}>"><img src="<{$v.pic}>" /></a>',

    	/*
        'a' => array
        (
            'href' => '$v.link',
            'title' => '$v.name',
        ),

        'img' => array
        (
            'src' => '$v.pic',
            'alt' => '$v.name',
        ),
        */
    )
)

# 业务介绍
->loop
(
    '.index-tuijian a',
    'main/data.getPush|key=service&name=业务介绍&num=2',
    array
    (
    	'self' => array
    	(
    		'class++' => 'Dever::lace(" tuijian-item-right, tuijian-item-left", $i+1)',
    		'href' => '$v.link',
    	),

        'h2' => array
        (
            'html' => '$v.name',
        ),

        'p' => array
        (
            'html' => '$v.content',
        ),

        'img' => array
        (
            'src' => '$v.pic',
            'alt' => '$v.name',
        ),
    )
)

# 单行公告
->loop
(
    '.dev-scroll-news-items',
    'demand/data.getNew',
    array
    (
        'self' => array
        (
            'html' => '$v.text',
        ),
    )
)

# 需求列表
->loop
(
    '.dev-panel',
    'demand/data.getIndex',
    array
    (
        'self' => array
        (
            'html' => '$v.data',
        ),
    )
)

->import('inc/foot')

# display
->display();
