<template>
    <div>
        <div class="label">
            常见问题</div>
        <div v-for="(v,index) in items">
            <div class="title" @click="titClick(index)">
                <span>{{v.title}}</span>
                <i class="iconfont icon-moren ico"></i>
            </div>
            <div class="conent">
                <div v-html="v.content"></div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    data(){
        return{
            items:[
                
            ],
            dictionaryId:"",
            data:[]
        }
    },
    methods:{
        getParamsData(){
            this.data=JSON.parse(this.$route.params.data)
        },
        titClick(res){
            if($(".conent").eq(res).css("height")=="0px"){
                $(".conent").eq(res).animate({"height":"100%"},0);
                $(".ico").eq(res).css({"transform":"rotate(90deg)"})
            }else{
                $(".conent").eq(res).animate({"height":"0"},0);
                $(".ico").eq(res).css({"transform":"rotate(0deg)"})
            }
        },
        getDictionaryId(){
            var that=this;
            that.$http.post('service/solution/fetchDataList/serviceGuide',{
                "idx": 0, 
                "sum": 10,
                "serviceGuide":{
                    "serviceType":{"id":that.data.id},
                    "status":1
                }
            }).then(function(res1){
                that.items=res1.data.list
            }) 
        }
    },
    created(){
        this.getParamsData();
        this.getDictionaryId();
    },
    mounted(){
    }
}
</script>
<style scoped>
.label {
    background-color: rgb(238, 238, 238);
    height: .6rem;
    line-height: .6rem;
    padding-left: .2rem;
    font-size: .24rem;
    color:#666666;
    border-top: .01rem rgb(223, 222, 222) solid;
    border-bottom: .01rem rgb(223, 222, 222) solid;
}
.title{
    padding: 0 .24rem;
    height: .88rem;
    display: flex;
    justify-content:space-between;
    align-items:center;
    border-bottom: .01rem rgb(223, 222, 222) solid;
}
.title span{
    font-size: .32rem
}
.title i{
    font-size: .32rem
}
.conent{
    /* padding: .24rem; */
    border-bottom: .01rem rgb(223, 222, 222) solid;
    height: 0;
    overflow: hidden;
}
.conent div{
    padding: .24rem;
    font-size: .28rem;
    line-height: .39rem;
    color: #666666;
    overflow: hidden;
    overflow-x: scroll
}
</style>