Signup.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div class="signup" v-if="configInfor && isData">
  3. <LoginNav2 :configInfor="configInfor" />
  4. <Registration />
  5. </div>
  6. </template>
  7. <script>
  8. //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  9. //例如:import 《组件名称》from ‘《组件路径》';
  10. import Registration from "@/components/login/registration";
  11. import LoginNav2 from "@/components/login/LoginNav2";
  12. import { getConfig } from "@/utils/auth";
  13. import { getConfigInfor } from "@/utils/index";
  14. import { updateWordPack } from "@/utils/i18n";
  15. export default {
  16. //import引入的组件需要注入到对象中才能使用
  17. components: {
  18. Registration,
  19. LoginNav2,
  20. },
  21. props: {},
  22. data() {
  23. //这里存放数据
  24. return {
  25. configInfor: null,
  26. isData: false,
  27. };
  28. },
  29. //计算属性 类似于data概念
  30. computed: {},
  31. //监控data中数据变化
  32. watch: {},
  33. //方法集合
  34. methods: {},
  35. //生命周期 - 创建完成(可以访问当前this实例)
  36. async created() {
  37. await updateWordPack({
  38. word_key_list: [
  39. "Key9",
  40. "Key10",
  41. "Key14",
  42. "Key15",
  43. "Key16",
  44. "Key17",
  45. "Key18",
  46. "Key21",
  47. "Key22",
  48. "Key23",
  49. "Key24",
  50. "Key25",
  51. "Key26",
  52. "Key27",
  53. "Key28",
  54. "Key29",
  55. "Key30",
  56. "Key31",
  57. "Key32",
  58. "Key33",
  59. "Key34",
  60. "Key35",
  61. "Key36",
  62. "Key37",
  63. "Key84",
  64. "Key121",
  65. "Key542",
  66. "Key540",
  67. "Key541",
  68. "Key542",
  69. "Key543",
  70. "Key544",
  71. "Key545",
  72. "Key546",
  73. ],
  74. });
  75. this.isData = true;
  76. },
  77. //生命周期 - 挂载完成(可以访问DOM元素)
  78. mounted() {
  79. if (getConfig()) {
  80. this.configInfor = JSON.parse(getConfig());
  81. } else {
  82. this.configInfor = getConfigInfor();
  83. }
  84. },
  85. //生命周期-创建之前
  86. beforeCreated() {},
  87. //生命周期-挂载之前
  88. beforeMount() {},
  89. //生命周期-更新之前
  90. beforUpdate() {},
  91. //生命周期-更新之后
  92. updated() {},
  93. //生命周期-销毁之前
  94. beforeDestory() {},
  95. //生命周期-销毁完成
  96. destoryed() {},
  97. //如果页面有keep-alive缓存功能,这个函数会触发
  98. activated() {},
  99. };
  100. </script>
  101. <style scoped>
  102. .signup {
  103. background: #e5e5e5;
  104. padding-bottom: 30px;
  105. }
  106. /* @import url(); 引入css类 */
  107. </style>