<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 })">{{ $t('login.register') }}</p>
  </div>
</template>

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

<style lang="scss" scoped>
.footer {
  margin-top: 10px;
  clear: both;
  color: #bb4767;
  line-height: 32px;
  cursor: pointer;
}
</style>
