<template>
  <div class="signup" v-if="configInfor && isData">
    <LoginNav2 :configInfor="configInfor" />
    <Registration />
  </div>
</template>

<script>
//这里可以导入其它文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》from ‘《组件路径》';
import Registration from "@/components/login/registration";
import LoginNav2 from "@/components/login/LoginNav2";
import { getConfig } from "@/utils/auth";
import { getConfigInfor } from "@/utils/index";
import { updateWordPack } from "@/utils/i18n";
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    Registration,
    LoginNav2,
  },
  props: {},
  data() {
    //这里存放数据
    return {
      configInfor: null,
      isData: false,
    };
  },
  //计算属性 类似于data概念
  computed: {},
  //监控data中数据变化
  watch: {},
  //方法集合
  methods: {},
  //生命周期 - 创建完成（可以访问当前this实例）
  async created() {
    await updateWordPack({
      word_key_list: [
        "Key9",
        "Key10",
        "Key14",
        "Key15",
        "Key16",
        "Key17",
        "Key18",
        "Key21",
        "Key22",
        "Key23",
        "Key24",
        "Key25",
        "Key26",
        "Key27",
        "Key28",
        "Key29",
        "Key30",
        "Key31",
        "Key32",
        "Key33",
        "Key34",
        "Key35",
        "Key36",
        "Key37",
        "Key84",
        "Key121",
        "Key542",
        "Key540",
        "Key541",
        "Key542",
        "Key543",
        "Key544",
        "Key545",
        "Key546",
      ],
    });
    this.isData = true;
  },
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {
    if (getConfig()) {
      this.configInfor = JSON.parse(getConfig());
    } else {
      this.configInfor = getConfigInfor();
    }
  },
  //生命周期-创建之前
  beforeCreated() {},
  //生命周期-挂载之前
  beforeMount() {},
  //生命周期-更新之前
  beforUpdate() {},
  //生命周期-更新之后
  updated() {},
  //生命周期-销毁之前
  beforeDestory() {},
  //生命周期-销毁完成
  destoryed() {},
  //如果页面有keep-alive缓存功能，这个函数会触发
  activated() {},
};
</script>
<style scoped>
.signup {
  background: #e5e5e5;
  padding-bottom: 30px;
}
/* @import url(); 引入css类 */
</style>