<template>
  <div style="background: #f0f0f0;padding-bottom:50px">
    <div class="banner">
      <img src="~@/assets/images/zmqy.jpg" alt="">
    </div>
    <div class="bread">
      <div>
        <span>当前位置:首页-知名企业-知名企业详情</span>
      </div>
    </div>
    <div class="smart-device">
      <div class="smart-title">
        <span><span>知名企业</span>ENTERPRISE</span>
      </div>
      <div class="smart-device-content">
        <div class="titles">
          <h3>{{ detail.name }}</h3>
        </div>
        <div class="list-content" v-html="detail.content" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            active: 1,
            detail: {}
        }
    },
    mounted() {
        document.documentElement.scrollTop = document.body.scrollTop = 0 // 回到顶部
        this.detail = this.$route.query
        if (this.detail.content.indexOf('width') !== -1 && this.detail.content.indexOf('height') !== -1) {
            this.detail.content = this.detail.content.replace(/width="(\S*)"/, 'width="100%"').replace(/height="(\S*)"/, 'height="100%"')
        }
    },
    methods: {
        detail1(index) {
            switch (index) {
                case 1:
                    this.$router.push({ path: '/company/detail' })
                    break
            }
        }
    }
}
</script>

<style scoped>
    .banner img{
        width: 100% !important;
    }
    @media screen and (min-width: 1000px){
        .bread{
            background: #fff;
        }
        .bread div{
            width: 1200px;
            margin: 0 auto;
            text-align: left;
            padding: 0.8rem 0;
            font-size: 1rem;
        }
        .smart-title{
            margin-top:3rem;
        }
        .smart-device{
            width: 1200px;
            margin: 0 auto;
            text-align: left;
            font-size: 1rem;
        }
        .smart-device span span{
            font-size: 2rem;
            display: inline-block;
            position: relative;
            padding-right: 1rem;
            margin-right: 1rem;
            font-weight: 900;
        }
        .smart-device span span:after{
            content: '';
            width: 1px;
            height: 15px;
            background: #666;
            position: absolute;
            right: 0;
            bottom: 7px;
        }
        .device-title img{
            width: 80%;
        }
        .nav-list{
            display: flex;
            justify-content: center;
            flex-wrap: nowrap;
            margin: 2rem auto;
            width: 50%;
        }
        .nav-list li{
            min-width: 33.33%;
            max-width: 33.33%;
            text-align: center;
            color: #666;
            font-size: 0.8rem;
            cursor: pointer;
        }
        .nav-list li span{
            border-bottom: 2px solid #f0f0f0;
            padding-bottom: 0.8rem;
        }
        .active span{
            display: inline-block;
            border-bottom: 2px solid #FF6A00!important;
            color: #333;
        }
    }
    @media screen and (max-width: 1000px){
        .bread{
            display: none;
        }
        .smart-title{
            margin-top:2rem;
        }
        .smart-device{
            width: 90%;
            margin: 0 auto;
            text-align: left;
            font-size: 1rem;
            overflow: hidden;
        }
        .smart-device span span{
            font-size: 1.5rem;
            display: inline-block;
            position: relative;
            padding-right: 1rem;
            margin-right: 1rem;
            font-weight: 900;
        }
        .smart-device span span:after{
            content: '';
            width: 1px;
            height: 15px;
            background: #666;
            position: absolute;
            right: 0;
            bottom: 7px;
        }
        .device-title img{
            width: 100%;
        }
        .nav-list{
            display: flex;
            justify-content: center;
            flex-wrap: nowrap;
            margin: 2rem;
        }
        .nav-list li{
            min-width: 33.33%;
            max-width: 33.33%;
            text-align: center;
            color: #666;
            font-size: 0.8rem;
            cursor: pointer;
        }
        .nav-list li span{
            border-bottom: 2px solid #f0f0f0;
            padding-bottom: 0.8rem;
        }
        .active span{
            display: inline-block;
            border-bottom: 2px solid #FF6A00!important;
            color: #333;
            font-weight:800!important;
        }
    }
    .titles{
        text-align: center;
        margin: 2rem 0;
    }
    .list-content{
        min-height: 10rem;
    }
</style>
