<template>
  <div>
    <router-view @success="handleSuccess"></router-view>
    <p class="back">
      <router-link to="../register">注册</router-link>
    </p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      title: '用户登录'
    }
  },
  methods: {
    handleSuccess(response) {
      const { url } = webConf.others.xlearn
      window.location.href = url
    }
  },
  created() {
    this.$parent.subTitle = this.title
  }
}
</script>
<style lang="scss" scoped>
.back {
  margin-top: 10px;
  color: #bb4767;
  text-align: right;
  a {
    color: currentColor;
    text-decoration: none;
  }
}
</style>
