<template>
  <view class="login">
    <loading />
  </view>
</template>

<script>
export default {
  props: ["login"],
  created() {
    this.init();
  },
  methods: {
    async init() {
      let loginRes = await this.$store.dispatch("Login");
      if (loginRes.code == 200) {
        this.$emit("update:login", true);
      } else {
        
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.login {
  width: 100vw;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;

  .user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    .avatar {
      border-radius: 50%;
      width: 100px;
      height: 100px;
      overflow: hidden;
    }

    .nickname {
      text-align: center;
    }
  }
}
</style>
