@extends('layout.layout')
@section('content')
    <div class="combo_list_nav_wrapper">
        <div class="combo_list_nav_item_wrapper combo_list_nav_item_active_wrapper">体检套餐</div>
        <a href="">
            <div class="combo_list_nav_item_wrapper">体检机构</div>
        </a>
    </div>
    <div class="combo_list_search_wrapper">
        @foreach($search_arr as $search_list)
            <div class="combo_list_search_line_wrapper">
                <div class="combo_list_search_line_title_wrapper">{{ $search_list['label'] }}</div>
                <div class="combo_list_search_line_content_wrapper">
                    @foreach($search_list['options'] as $search_item)
                        <div @click="pageJump('{{ $search_list['value'] }}','{{ $search_item['value'] }}')" class="combo_list_search_line_content_item_wrapper
                        @if($search_item['value'] == $search_choose[$search_list['value']]) combo_list_search_line_content_active_wrapper @endif
                        ">{{ $search_item['label'] }}</div>
                    @endforeach
                </div>
            </div>
        @endforeach
    </div>
    <div class="combo_list_order_wrapper">
        <div class="combo_list_order_line_wrapper">
            <div class="combo_list_order_line_title_wrapper">排序方式</div>
            <div class="combo_list_order_line_content_wrapper">
                <div @click="pageJump('order','zh')" class="combo_list_order_line_content_item_wrapper
                        @if('zh' == $search_choose['order']) combo_list_order_line_content_active_wrapper @endif
                        ">综合排序
                </div>
                <div @click="pageJump('order','zk')" class="combo_list_order_line_content_item_wrapper
                        @if('zk' == $search_choose['order']) combo_list_order_line_content_active_wrapper @endif
                        ">折扣最多
                </div>
            </div>
            <div class="combo_list_count_wrapper">共有<span
                    class="combo_list_count_number_wrapper">{{ $combo_count }}</span>个符合条件的套餐
            </div>
        </div>
    </div>
    <div class="combo_wrapper">
        <div class="combo_list_wrapper">
            @foreach($combos['data'] 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>

    @if(count($combos['data']) > 0)
        <div class="page_wrapper">
            @foreach($combos['links'] as $key => $item)
                <a @if (!!$item['url'])
                       href="{{ $item['url'] }}"
                    @endif>
                    <div class="page_item_wrapper @if(!!$item['active'])
page_item_active_wrapper
            @endif">
                        @if($key == 0)
                            上一页
                        @elseif($key == count($combos['links']) - 1)
                            下一页
                        @else
                            {{ $item['label'] }}
                        @endif
                    </div>
                </a>
            @endforeach
        </div>
    @else
        <div class="no_data_wrapper">未搜索到符合条件的套餐</div>
    @endif
@endsection
