<template>
  <div class="home">
    <nav-bar />
    <div class="bj"></div>
    <div class="jianjie">
      <!-- <h2><img :src="detail.img" /></h2> -->
      <h3>
        {{ detail.name }}<span>&nbsp;&nbsp;&nbsp;{{ detail.label }}</span>
        <p>卡号：{{ detail.card }}</p>
      </h3>
    </div>
    <div class="box1">
      <div class="container">
        <h2>体检套餐</h2>
        <p>{{ detail.iname }}</p>
      </div>
    </div>
    <div class="box1">
      <div class="container">
        <h2>预约时间</h2>
        <p>{{ detail.yytime }}{{ detail.isap }}</p>
      </div>
    </div>
    <div class="box1">
      <div class="container">
        <h2>体检项目</h2>
        <div v-html="detail.explain">{{detail.explain}}</div>
      </div>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
import { apiGetInspectYyInfo } from "@/request/api.js";
import { Toast } from "vant";
export default {
  components: {},
  mounted() {
    console.log(this.$route.meta.title);
    this.title = this.$route.meta.title;
  },
  data() {
    return {
      active: 0,
      title: "",
      flag: false,
      checked: false,
      detail: {},
      jianjie: [
        {
          img: require("../assets/yisheng.jpg"),
          url: "Ysgh",
          name: "张树立",
          office: "骨科",
          grade: "主任医师、硕士生导师",
          jianj: "擅长：骨科各种危重症的诊断和抢救、以骨关节为",
        },
      ],
    };
  },
  mounted() {
    this.getData();
  },
  methods: {
    // 获取详情
    getData() {
      apiGetInspectYyInfo({
        id: this.$route.query.id,
      }).then((res) => {
        this.detail = res.data;
      });
    },
  },
};
</script>


<style scoped lang="scss">
.bj {
  background: #f5f5f5;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  z-index: -1;
}
.jianjie {
  background: #fff;
  box-sizing: border-box;
  padding: 30px;
  display: flex;
  border-bottom: 20px solid #f5f5f5;
  h2 img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin-right: 20px;
  }
  h3 {
    color: #333;
    font-size: 30px;
    position: relative;
    width: calc(100% - 150px);
    span {
      font-size: 26px;
      padding-top: 10px;
      display: block;
    }
    p {
      font-size: 24px;
      color: #999;
      display: block;
      padding-top: 10px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    em {
      width: 86px;
      height: 38px;
      line-height: 38px;
      background: linear-gradient(-90deg, #ff464f, #ff6e77);
      border-radius: 16px;
      position: absolute;
      right: 0px;
      top: 0px;
      font-size: 20px;
      text-align: center;
      color: #fff;
    }
  }
  h3.on em {
    background: #999999;
  }
}

.box1 {
  background: #fff;
  padding: 40px 0px;
  margin-bottom: 10px;
}

.box1 h2 {
  font-size: 32px;
  color: #333;
  padding-bottom: 20px;
}

.box1 p {
  color: #333;
  font-size: 28px;
  display: block;
  padding-bottom: 20px;
}
.box1 img {
  max-width: 100%;
  height: auto;
}
</style>
