<template>
    <div class="website-details-page">
        <!-- 首页导航栏 -->
        <nav class="website-head">
            <div class="website-container head-layout">
                <div class="head-left">
                    <a></a>
                    <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal"
                             @select="handleSelect">
                        <el-menu-item index="首页">首页</el-menu-item>
                        <el-menu-item index="考试平台">考试平台</el-menu-item>
                        <el-menu-item index="培训平台">培训平台</el-menu-item>
                        <el-menu-item index="课程开发">课程开发</el-menu-item>
                        <el-menu-item index="新闻资讯">新闻资讯</el-menu-item>
                        <el-menu-item index="帮助中心">帮助中心</el-menu-item>
                        <el-menu-item index="关于我们">关于我们</el-menu-item>
                    </el-menu>
                </div>
                <div class="head-right">
                    <i></i><span>4000-522-130</span>
                </div>
            </div>
        </nav>
        <MtaBreadcrumb></MtaBreadcrumb>
        <!--网站行业资讯详情页-->
        <div class="website-details-wrap">
            <h1>{{infoData.title}}</h1>
            <p><i></i><span>{{infoData.startTime}}</span><i type="visits"></i><span>{{infoData.visits}}</span></p>
            <div class="website-content-box">{{infoData.content}}</div>
        </div>
    </div>
</template>

<script>
    import MtaBreadcrumb    from '@/components/client/common/MtaBreadcrumb.vue';
    import { homeIndustryInfo } from '@/api/login.js';
    export default {
        name:       'courseDev',
        props:      {
        },
        data() {
            return {
                iiId:  '',
                infoData:{}
            };
        },
        components: {
            MtaBreadcrumb
        },
        computed:   {},
        methods:    {
            handleSelect(key, keyPath) {
                if (key === '考试平台') {
                    window.location.href = "https://www.baidu.com";
                } else if (key === '培训平台') {
                    window.location.href = "http://39.97.175.90:7788/zentao/my/";
                } else {
                    this.$router.push({ name: key });
                }
            },
            getIndustryInfo(){
                let req = {
                    iiId  : this.iiId,
                    }
                homeIndustryInfo(req).then(res=>{
                       if(res.code===0){
                           console.log(res.data);
                          this.infoData =  res.data
                       }
                })

            }

        },
        created() {
           console.log(this.$route.params);
           this.iiId = this.$route.params.iiId;
           this.getIndustryInfo()
        },
        mounted() {

        },
        beforeDestroy() {
        },
    };
</script>
<style>

</style>
