@extends('layout.layout')
@section('content')
    <div class="banner_wrapper">
        <div class="banner_nav_wrapper">
            <div class="banner_nav_button_wrapper">快捷菜单</div>
            <div class="banner_nav_group_wrapper">
                <div class="banner_nav_group_item_wrapper">权威医院</div>
                <div class="banner_nav_group_item_wrapper">精选套餐</div>
                <div class="banner_nav_group_item_wrapper">健康科普</div>
                <div class="banner_nav_group_item_wrapper">体检采购平台</div>
            </div>
        </div>
        <div class="banner_menu_wrapper">
            <div class="banner_menu_list_wrapper">
                @foreach($navs as $nav)
                    <a href={{$nav->url}}>
                        <div class="banner_menu_item_wrapper">
                            <div class="banner_menu_item_title_wrapper">{{$nav->title}}</div>
                            <div class="banner_menu_item_subtitle_wrapper">{{$nav->l_title}}</div>
                        </div>
                    </a>
                @endforeach
{{--                <div class="banner_menu_item_wrapper">--}}
{{--                    <div class="banner_menu_item_title_wrapper">体检机构</div>--}}
{{--                    <div class="banner_menu_item_subtitle_wrapper">公立医院 体检机构</div>--}}
{{--                </div>--}}
{{--                <div class="banner_menu_item_wrapper">--}}
{{--                    <div class="banner_menu_item_title_wrapper">体检采购平台</div>--}}
{{--                    <div class="banner_menu_item_subtitle_wrapper">企业采购体检 安全可靠</div>--}}
{{--                </div>--}}
            </div>
            <div class="banner_menu_cover_wrapper">
{{--                <img src="./assets/images/banner.png" alt="">--}}
                <el-carousel height="450px">
                    @foreach($首页轮播 as $item)
                        <el-carousel-item >
                            <img src={{env('APP_URL')}}{{$item}} alt="">
                        </el-carousel-item>
                    @endforeach
                </el-carousel>
            </div>
        </div>
    </div>
    <div class="ad_wrapper">
        <div class="ad_item_wrapper">
            <img src="./assets/images/ad1.png" alt="">
        </div>
        <div class="ad_item_wrapper">
            <img src="./assets/images/ad2.png" alt="">
        </div>
        <div class="ad_item_wrapper">
            <img src="./assets/images/ad3.png" alt="">
        </div>
    </div>
    <div class="combo_wrapper">
        <div class="combo_top_wrapper">
            <div class="combo_title_wrapper">精选套餐</div>
        </div>
        <div class="combo_list_wrapper">
            @foreach($combos as $combo)
                <a href="/combo?id={{ $combo->id }}" class="combo_item_wrapper">
                    <div class="combo_cover_wrapper">
                        @if($combo->cover != '')
                            <img src="{{ $combo->cover }}" alt="">
                        @else
                            <div>暂无封面图</div>
                        @endif
                    </div>
                    <div class="combo_name_wrapper">{{ $combo->name }}</div>
                    <div class="combo_tags_wrapper">
                        @foreach($combo->tags_arr as $tag)
                            <div class="combo_tag_wrapper">{{ $tag }}</div>
                        @endforeach
                    </div>
                    <div class="combo_price_wrapper">
                        <span>¥ {{ $combo->price }}</span>
                        @if($combo->price < $combo->original_price)
                            <span class="combo_original_price_wrapper">{{ $combo->original_price }}</span>
                        @endif
                    </div>
                </a>
            @endforeach
        </div>
    </div>
    <div class="combo_wrapper">
        <div class="combo_top_wrapper">
            <div class="combo_title_wrapper">体检机构</div>
        </div>
        <div class="combo_list_wrapper">
            @foreach($hospitals as $hospital)
                <a class="combo_item_wrapper">
                    <div class="combo_cover_wrapper">
                        @if($hospital->logo != '')
                            <img src="{{ $hospital->logo }}" alt="">
                        @else
                            <div>暂无封面图</div>
                        @endif
                    </div>
                    <div class="combo_name_wrapper">{{ $hospital->name }}</div>
                    <div class="hospital_address_wrapper">
                        <i class="hospital_address_icon_wrapper czs-location"></i>
                        <span class="hospital_address_text_wrapper">{{ $hospital->address }}</span>
                    </div>
                    <div class="combo_tags_wrapper">
                        @foreach($hospital->tags_arr as $tag)
                            <div class="combo_tag_wrapper">{{ $tag }}</div>
                        @endforeach
                    </div>
                </a>
            @endforeach
        </div>
    </div>
    <div class="combo_wrapper">
        <div class="combo_top_wrapper">
            <div class="combo_title_wrapper">部分合作医院&机构</div>
        </div>
        <div class="hospital_list_wrapper">
            @foreach($link_units as $key=>$link_unit)
                @if($link_unit->type == 1 and $key<8)
                    <div class="hospital_item_wrapper">
                        <img src="./assets/images/yy-logo.png" alt="">
                    </div>
                @endif
            @endforeach
            <div class="hospital_item_blank_wrapper"></div>
            <div class="hospital_item_blank_wrapper"></div>
            <div class="hospital_item_blank_wrapper"></div>
            <div class="hospital_item_blank_wrapper"></div>
        </div>
    </div>
    <div class="combo_wrapper">
        <div class="combo_top_wrapper">
            <div class="combo_title_wrapper">部分合作企业&单位</div>
        </div>
        <div class="hospital_list_wrapper">
            @foreach($link_units as $key=>$link_unit)
                @if($link_unit->type == 2 and $key<8)
                    <div class="hospital_item_wrapper">
                        <img src="./assets/images/yy-logo.png" alt="">
                    </div>
                @endif
            @endforeach
            <div class="hospital_item_blank_wrapper"></div>
            <div class="hospital_item_blank_wrapper"></div>
            <div class="hospital_item_blank_wrapper"></div>
            <div class="hospital_item_blank_wrapper"></div>
        </div>
    </div>
@endsection
