<template>
  	<section class="font-style">
        <section class="home-header">
            <div class="home-topMenu">
                <YqyHomeHeader/>
            </div>
            <div class="swiper">
                <mt-swipe :auto="0">
                    <mt-swipe-item>
                        <img src="../../images/552064153@2x.png"/>
                    </mt-swipe-item>
                    <mt-swipe-item>
                        <img src="../../images/552064153@2x.png"/>
                    </mt-swipe-item>
                </mt-swipe>
            </div>
        </section>
        <section class="home-body">
            <YqyHomeBanner/>

            <div class="pathologicList">
                <div class="pathologicItem">
                    <span class="pathologicIcon">
                        <img src="../../images/G@2x.png"/>
                    </span>
                    <span class="pathologicTxt fs14">高血压全解析</span>
                </div>
                <div class="pathologicItem" style="margin-right: 0">
                    <span class="pathologicIcon">
                        <img src="../../images/G3x.png"/>
                    </span>
                    <span class="pathologicTxt fs14">高血压全解析</span>
                </div>
                <div class="clear"></div>
            </div>
            
            <!--继续学习-->
            <YqyHomeKeepon/>

            <!--专题分类-->
            <YqyCategoryThree1/>

            <!--健康守门人-->
            <YqyHomePorter/>
            
            <!--云雀名师-->
            <YqyHomeAdv/>

             <!--最新课程-->
            <YqyTeacherList/>
            
            <!--分钟医学院-->
            <YqyFiveMinutes/>
            
            <!--为你推荐-->
            <YqyHomeAdjust/>
            
        </section>
        <section class="home-bottom">
            <!-- <yqyTest/> -->
        </section>
    </section>
</template>

<script>
import { Swipe, SwipeItem ,Header} from 'mint-ui';
// import yqyTest from '@/components/common/yqy/yqyTest'
import YqyHotLabel from '../../components/business/yqy-hot-label';
import YqyHotTeacher from '../../components/business/yqy-hot-teacher';
import YqyTeacherList from '../../components/business/yqy-teacher-list';
import YqyTeacherInfo from '../../components/business/yqy-teacher-info';
import YqyHomeHeader from '../../components/business/yqy-home-header';
import YqyHomeAdv from '../../components/business/yqy-home-adv';
import YqyFiveMinutes from '../../components/business/yqy-five-minutes';
import YqyCategoryThree1 from '../../components/business/yqy-category-three-1';
import YqyHomeBanner from '../../components/business/yqy-home-banner';
import YqyHomeKeepon from '../../components/business/yqy-home-keepon';
import YqyHomePorter from '../../components/business/yqy-home-porter';
import YqyHomeAdjust from '../../components/business/yqy-adjust';
export default {
    data(){
        return {
            
        }
    },
    components:{
        Header,
        Swipe,
        SwipeItem,
        // yqyTest
        YqyHotLabel,
        YqyHotTeacher,
        YqyTeacherList,
        YqyTeacherInfo,
        YqyHomeHeader,
        YqyHomeAdv,
        YqyFiveMinutes,
        YqyCategoryThree1,
        YqyHomeBanner,
        YqyHomeKeepon,
        YqyHomePorter,
        YqyHomeAdjust
    },
	mounted(){
        this.init()
    },

    computed:{
    },

    methods:{
        init() {

            this.API_GET('contents/homeButton/msg', {}).then( res => {
                logger.debug(res)
                this.$log.debug(res)
            })

            let para = {
                sysCode: 27, 
                token: this.token,
                setEntry: 'headers'
            }
            this.GET('analysis/activityDetail', para).then( res => {
                logger.debug(res)
            })
            para = {
                sysCode: 27, 
                rankingType: 27,
                flag: 1,
                token: this.token,
                setEntry: 'headers'
            }
            this.GET('exams/rankings', para).then( res => {
                logger.debug(res)
            })
         
        },
        pushView : function(page){
            console.log('pushView');
            rocNative.pushView({
                url : page
            }).then(function(res) {
                console.log('pushView then' + JSON.stringify(res));
            }).catch(function(res){
                console.log('pushView catch' + JSON.stringify(res));
            });
        },
        goBack: function (msg) {
            console.log('goBack');
            rocNative.goBack()
            .then(function(res) {
                console.log('goBack then' + JSON.stringify(res));
            }).catch(function(res){
                console.log('goBack catch' + JSON.stringify(res));
            });
        },
        toast : function(msg){
            console.log('toast');
            rocNative.toast({
                msg: msg
            }).then(function(res) {
                console.log('toast then' + JSON.stringify(res));
            }).catch(function(res){
                console.log('toast catch' + JSON.stringify(res));
            });
        },
    },
}

</script>
<style>
    .swiper .mint-swipe-indicators{
        right: 6px;
        top:50%;
        bottom: inherit;
        left:inherit;
        width:10px;
        text-align: center;
        transform: translateX(0%);
        transform: translateY(-50%);
    }
   .swiper .mint-swipe-indicator{
        width:2px;
        height: 8px;
        background: #fff;
        opacity: 0.4;
    }
    .swiper .is-active{
        opacity: 1;
    }
</style>
<style lang="scss" scoped>
    @import '../../style/mixin';
    .mint-header {
        background-color: rgba($color: #000000, $alpha: 0)
    }
    .font-style {
        @include sc(0.6rem, #666);
    }
    .home-topMenu{
        width: 100%;
        text-align:center;
        top:0.84375rem;
        position: absolute;
        z-index: 10;
    }

    .home-header {
        height: px2rem(202px);
        .swiper{
            height: 100%;
           /* @include bis('../../images/552064153@2x.png');*/
        }
        

        .logo_img{
            height: px2rem(85px);
            width: px2rem(345px);
            text-align: center;
        }
    }
    .home-body{
        background: #fff
    }
    .pathologicList{
        width: 100%;
        
        padding: 0 px2rem(15px);
        margin-top:  px2rem(15px);
        .pathologicItem{
            float: left;
            width:48%;
            box-shadow: 0 px2rem(2px) px2rem(6px) RGBA(42, 94, 161, 0.15);
            border-radius: px2rem(3px);
            background: #fff;
            padding: px2rem(12px) 0 px2rem(12px) 0;
            margin-right: 4%;
            text-align: center;
            .pathologicIcon{
                vertical-align: middle;
                img{
                    width:  px2rem(20px);
                    height:  px2rem(20px);
                }
            }
            .pathologicTxt{
                font-size: px2rem(14px);
                line-height:  px2rem(20px);
                font-weight: 700;
                display: inline-block;
                vertical-align: middle;
            }
        }
        .clear{
            clear: both;
        }
    }

</style>
