<template>
  <div class="container">
    <div class="bgimg"></div>
    <div class="content">
      <div class="title" v-if="type==1">操作手册-医生版</div>
      <div class="title" v-if="type==2">操作手册-个人版</div>
      <div class="loginForm">
        <div class="agreedoc">
          <!-- <iframe v-if="type==1" src="https://xjcoss.oss-cn-shanghai.aliyuncs.com/zky/static/pdf/doctor.pdf#toolbar=0"
            frameborder="0" height="100%"></iframe>
            <iframe v-if="type==2" src="https://xjcoss.oss-cn-shanghai.aliyuncs.com/zky/static/pdf/patient.pdf#toolbar=0"
            frameborder="0" height="100%"></iframe> -->
            <img v-if="type==1" src="../assets/images/doctor.jpg" width="100%" alt="">
            <img v-if="type==2" src="../assets/images/patient.jpg" width="100%" alt="">
        </div>
      </div>
      <div class="footer">
        <div class="jbbtn" @click="goPage">返回</div>
      </div>
    </div>
  </div>
</template>

<script>
  import {
    Field
  } from 'mint-ui'

  export default {
    name: 'Index',
    components: {
      Field
    },
    data() {
      return {
        msg: 'Welcome to Your Vue.js App',
        agreenDoc: '',
        type:this.$route.query.type
      }
    },
    methods: {
      goPage() {
        let from = this.$route.query.from;
        if (this.type == 1) {
          this.$router.push('/docindex')
        } else {
          this.$router.push('/patindex')
        }
      }
    },
    created() {
        console.log(this.type,33333333333333)
    },
  }

</script>

<style scoped lang="scss">
  .loginForm {
    width: 90%;
    margin: auto;
    margin-top: 2rem;
    /* border:1px solid red; */
    height: 80vh;
    border-radius: 1rem;
    background: #fff;
    padding: 10px;
    /* height: 100%; */
  }

  .agreedoc {
    height: 100%;
    overflow-y: scroll;
  }

  .footer {
    bottom: 1rem;
    margin: 0 auto;
    left: 0;
    right: 0;
    bottom: 1rem;
  }

  .container .content .loginForm{
      margin-top:2rem;
  }

</style>
