<template>
    <div class="wq3">                         
      <img src="static\images\u.png" style="width:5px;height:20px;">                           
      <div class="kefont"><span >医院介绍</span></div>
      <div class="more" @click="more()">查看更多</div>
      <div class="logo"><img src="static\images\u216.png"></div>
      <div class="content">
        <span v-html="hispitalform.introduction" id="content" class="yycontent"></span>
       </div>    
    </div>
</template>

<script>
     import { GetHospitalInfo } from '@/api/site/site'
    export default {
        name: "hospital-introduction",
        data(){
          return{
            hispitalform:{
             title:"",
             sort:"",
             introduction:"",
            },
          }
        },
        methods:{
             //获取医院介绍
            GetHospitalInfo(){
              GetHospitalInfo().then(response=>{
               if(response.data.state == 1){
                var hospital =  response.data.data.hospital;
               this.hispitalform =  response.data.data.hospital;
             // console.log("获取医院介绍数据",hospital);
             }
           })
          },
        },
        created(){
           this.GetHospitalInfo(); 
        },
         updated(){
            let obj = document.getElementById('content');
            console.log("obj是什么",obj)
            let imgs =  obj.getElementsByTagName('img');
            console.log("imgs",imgs)
            for(let i=0;i<imgs.length;i++){
            imgs[i].style.width = '332px';
            imgs[i].style.height = '100px';
         }
       }
    }
</script>

<style scoped>
   
     .wq3{
        width: 320px;
        height: 230px;
        background-color: white;
        color: #ffffff;
      /* border: solid 1px black; */
        margin-bottom: 0px;
     }

    .kefont{
       font-size: 14px;
       color: red;
       margin-left: 8px;
       margin-top: -20px;
     }

     .more{
       position: absolute;
       font-size: 14px;
       color:black;
       margin-left: 220px;
       margin-top: -22px;
     }

    .logo{
       position: absolute;
       margin-left: 280px;
       margin-top: -22px;
     }

      .content{
       position: absolute;
       font-size: 14px;
       color: black;
     }

     .yycontent{
     overflow: hidden;
     text-overflow: ellipsis;
     display: -webkit-box;
     -webkit-line-clamp: 6;
     -webkit-box-orient: vertical   
   }
</style>
