<template>
  <div class="container">
    <div class="bgimg"></div>
    <div class="content">
      <div class="csbtn" @click="goPage('/doclogin')">医生端</div>
      <div class="jbbtn" @click="goPage('/patregister')">个人端</div>
      <button class="jbbtn" @click="logout">退出登录</button>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'Index',
    data() {
      return {
        msg: 'Welcome to Your Vue.js App'
      }
    },
    methods: {
      goPage(path) {
        this.$router.push(path)
      },
      logout(){
        window.localStorage.removeItem('token')
        window.localStorage.removeItem('authinfo')
        window.location.reload()
      }
    }
  }

</script>

<style scoped lang="scss">
  .container {
    background:#fff;
    .bgimg {
      width: 100%;
      height: 14rem;
      margin-top: 3rem;
      position: absolute;
      background-image: url("../assets/images/entrybg.jpg");
      background-image: url("../assets/images/entrybg.jpg");
      background-size: 100% 100%;
    }
  }

</style>
