<template>
  <div class="login">
    <h1 class="title">登录</h1>
    <div class="login-box">
      <router-view @success="handleSuccess"></router-view>
    </div>
    <p class="footer" @click="$router.push({ path: '../register', query: $route.query })">注册</p>
  </div>
</template>

<script>
export default {
  methods: {
    handleSuccess() {
      window.location.href = document.referrer
    }
  }
}
</script>

<style lang="scss" scoped>
.footer {
  margin-top: 40px;
  clear: both;
  color: #007bad;
  line-height: 52px;
  text-align: center;
  border-top: 1px solid #c2c8d0;
  cursor: pointer;
  margin-left: -40px;
  margin-right: -40px;
  margin-bottom: -60px;
}
</style>
