<template>
    <div class="conatiner">
        <el-carousel class="swiper banner" :class="[bannerList.length==1?'noButton':'']" height="220px" :interval="4000">
            <template v-for="item in bannerList">
                <el-carousel-item :style="{backgroundImage:'url('+item.imageUrl+')'}">
                    <a v-if="item.url" :href="item.url"></a>
                </el-carousel-item>
            </template>

        </el-carousel>

        <div class="content">
            <div class="name">
                <div class="kuai"></div>
                <span>加入我们</span>
            </div>

            <div class="content-content">

                <div class="content-text">
                    <div v-html='joinInfo.manifesto'>

                    </div>
                    邮箱：{{joinInfo.email}}
                    <br/> 联系方式：{{joinInfo.telephone}}
                </div>

                <div class="line"></div>

                <div class="content-img">
                    <img src="../assetsPre/join.png" alt="">
                    <div class="button" @click="goNext">诚聘英才</div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'home',
    data() {
        return {
            joinInfo: {},
            bannerList: []
        }
    },
    mounted() {
        this.$http.get({
            url: '/joinUs/getOne',
            data: {
                id: 1
            }
        }).then(res => {
            if (res.success) {
                this.joinInfo = res.data
            }
        }).catch(e => {
            console.log(e)
        })

        this.$http.get({
            url: '/bannerInfo/all',
            data: {
                location: 14
            }
        }).then(res => {
            if (res.success) {
                this.bannerList = res.data
            }
        }).catch(e => {
            console.log(e)
        })
    },
    computed: {
    },
    methods: {
        goNext(){
            window.open(this.joinInfo.zhaopin)
        }
    }
}
</script>

<style lang="less" scoped>
.banner {
    width: 1191px;
    height: 220px;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    margin: auto;
}

.content {
    width: 1146px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(234, 234, 234, 1);
    padding: 0 22px;
    .name {
        height: 36px;
        line-height: 36px;
        border-bottom: 1px solid #ebebeb;
        .kuai {
            width: 7px;
            height: 15px;
            background: rgba(11, 158, 192, 1);
            display: inline-block;
            vertical-align: middle;
        }

        span {
            font-size: 14px;
            font-family: MicrosoftYaHei;
            color: rgba(51, 51, 51, 1);
            line-height: 19px;
            margin-left: 13px;
            vertical-align: middle;
        }
    }
    .content-content {
        overflow: hidden;
        padding: 30px 0;
        .content-img {
            width: 383px;
            height: 248px;
            background-position: center center;
            background-repeat: no-repeat;
            background-size: cover;
            display: inline-block;
            vertical-align: middle;

            img {
                width: 137px;
                height: 99px;
                display: block;
                margin: auto;
            }

            .button {
                width: 149px;
                height: 50px;
                border: 1px solid rgba(11, 158, 192, 1);
                font-size: 24px;
                font-family: PingFangSC-Regular;
                color: rgba(11, 158, 192, 1);
                line-height: 50px;
                text-align: center;
                margin: 37px auto;
                cursor: pointer;
            }
        }

        .line {
            width: 1px;
            height: 248px;
            display: inline-block;
            vertical-align: middle;
            background-color: #eaeaea;
        }
        .content-text {
            width: 720px;
            display: inline-block;
            vertical-align: middle;
            font-size: 14px;
            font-family: MicrosoftYaHei;
            color: rgba(51, 51, 51, 1);
            line-height: 30px;
            padding-left: 30px;
        }
    }
}
</style>
