<template>
    <view>
        <view class="content">
            <view class="box1 box">
                 <view class="title">
                     <view>主题住宿</view>
                 </view>
                 <view class="box1-content">
                     <view class="content-title">
                         <view class="active">亲子之选</view>
                         <view>周末好去处</view>
                         <view>目的地特色</view>
                         <view>私人海滩</view>
                         <view>吃货根据地</view>
                         <view>潜水生地</view>
                     </view>
                     <!-- 内容 -->
                     <view class="neirong">
                         <view class="nr-box">
                             <view class="nr-content" v-for="(item,index) in box1TitleList" :key='index'>
                                 <image :src="item.src" mode=""></image>
                                 <view  class="content-text">
                                     <view>{{item.title}}</view>
                                     <!-- 地址 -->
                                     <view class="content-dzhi">
                                         {{item.dzhi}}
                                     </view>
                                 </view>
                             </view>
                         </view>
                     </view>
                 </view>
            </view> 
            <view class="box2 box">
                <view class="title">
                    <view>特价酒店</view>
                </view>
                <view class="box1-content">
                    <view class="content-title">
                        <view class="active">曼谷</view>
                        <view>台北</view>
                        <view>东京</view>
                        <view>香港</view>
                        <view>首尔</view>
                        <view>新加坡</view>
                    </view>
                    <!-- 内容 -->
                    <view class="neirong">
                        <view class="nr-box">
                            <view class="nr2-content" v-for="(item,index) in box2TitleList" :key='index'>
                                <view class="bac"></view>
                                <image :src="item.src" mode="" class="nr-img"></image>
                                <view  class="content-text">
                                    <!-- 分数 -->
                                    <view class="text-num">
                                        {{item.num}}
                                    </view>
                                    <!-- 介绍 -->
                                    <view class="text-name">
                                        {{item.name}}
                                    </view>
                                </view>
                               
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
    export default {
        name:"gotelContent",
        data() {
            return {
                box1TitleList:[
                    
                        {
                            src:'../../static/hotel/1.jpeg',
                            title:'狗骨岛',
                            dzhi:'泰国'
                        },
                        {
                            src:'../../static/hotel/2.jpeg',
                            title:'三亚',
                            dzhi:'中国'
                        },
                        {
                            src:'../../static/hotel/3.jpeg',
                            title:'大阪',
                            dzhi:'日本'
                        },
                        {
                            src:'../../static/hotel/4.jpeg',
                            title:'苏梅岛',
                            dzhi:'泰国'
                        },
                        {
                            src:'../../static/hotel/5.jpeg',
                            title:'大阪',
                            dzhi:'新西兰'
                        },
                        {
                            src:'../../static/hotel/6.jpeg',
                            title:'大堡礁',
                            dzhi:'澳大利亚'
                        }
                    
                ],
                box2TitleList:[
                        {
                            src:'../../static/hotel/hotel1.jpeg',
                            num:'8.4分',
                            name:'曼谷威客3号酒店（原曼谷胜利纪念碑全季酒店）'
                        },
                        {
                            src:'../../static/hotel/hotel2.jpeg',
                            num:'8.8分',
                            name:'穰南帝景酒店'
                        },
                        {
                            src:'../../static/hotel/hotel3.jpeg',
                            num:'8.4分',
                            name:'璀璨专享服务公寓'
                        },
                        {
                            src:'../../static/hotel/hotel4.jpeg',
                            num:'8.7分',
                            name:'曼谷暹罗安纳塔拉酒店'
                        },
                        {
                            src:'../../static/hotel/hotel5.jpeg',
                            num:'7.7分',
                            name:'彩虹云霄酒店'
                        },
                        {
                            src:'../../static/hotel/hotel6.jpeg',
                            num:'8.7分',
                            name:'曼谷利特酒店'
                        },
                        {
                            src:'../../static/hotel/hotel7.jpeg',
                            num:'8.3分',
                            name:'暹罗四季酒店'
                        },
                        {
                            src:'../../static/hotel/hotel8.jpeg',
                            num:'8.7分',
                            name:'曼谷廊曼机场阿玛瑞酒店'
                        },
                        
                ]
            };
        }
    }
</script>

<style lang="scss">
    .content{
        
        //标题名
        .title{
            margin-top: 50px;
            margin: 100px 0 25px 0 ;
            text-align: center;
            color: #333;
            font-size: 24px;
            line-height: 30px;
        }
        
        .box{
            width: 1000px;
            margin: 0 auto;
            
            .active{
                border-bottom: 3px solid $color;
                color: $color;
                margin-bottom: -2px;
            }
            .box1-content{
                //菜单栏
                .content-title{
                    display: flex;
                    font-size: 18px;
                    height: 50px;
                    text-align: center;
                    line-height: 50px;
                    border-bottom: 1px solid #e4e4e4;
                    &>view{
                        width: 16.6%;
                        cursor: pointer;
                    }
                }
                //内容
                .neirong{
                    
                    .nr-box{
                        width: 1023px;
                        display: flex;
                        flex-wrap: wrap;
                        .nr-content{
                            width: 318px;
                            height: 240px;
                            margin: 20px 23px 0 0 ;
                            position: relative;
                            .content-text{
                                position: absolute;
                                top: 50%;
                                left: 0;
                                width: 100%;
                                text-align: center;
                                font-size: 30px;
                                color: #fff;
                                font-weight: normal;
                                text-shadow: 2px 2px 2px rgba(0,0,0,.8);
                                margin-top: -30px;
                                .content-dzhi{
                                    font-size: 16px;
                                }
                            }
                        }
                    }
                }
            }
        }
        .box2{
            
            &>.box1-content{
                
                &>.neirong{
                    margin-top: 20px;
                    .nr2-content{
                        position: relative;
                        width: 240px;
                        height: 240px;
                        overflow: hidden;
                        margin:0 13px 13px 0;
                        .nr-img{
                            width: 100%;
                            height:100%;
                        }
                        //阴影
                        .bac{
                            width: 100%;
                            height: 100%;
                            position: absolute;
                            top: 0;
                            left: 0;
                            background-color:rgb(83, 83, 83);
                            z-index: 2;
                            opacity: .2;
                            transition: all 0.5s;
                        }
                        &:hover .bac{
                            opacity: 0;
                        }
                        .content-text{
                            
                            .text-num{
                                position: absolute;
                                top: 13px;
                                left: 13px;
                                border-radius: 4px;
                                text-align: center;
                                width: 55px;
                                height: 25px;
                                color: #fff;
                                font-size: 18px;
                                background-color: rgba(0,0,0,.5);
                            }
                            .text-name{
                                position: absolute;
                                bottom: 13px;
                                left: 13px;
                                margin-top: -30px;
                                font-size: 14px;
                                color: #ffffff;
                                width: 220px;
                                text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
                            }
                        }
                    }
                }
            }
        }
    }
</style>
