zzzz
2024-04-22 629e34b635ab0d40e17a1baa09c67ffa7fcdd75c
src/page/register/index.vue
@@ -253,52 +253,19 @@
    async registerApi() {
      this.$store.state.user.userInfo.token = undefined;
      await AxiosuserCenter.invitationCode({
        code: this.form.usercode,
      });
      Axios.registerUser({
        username: this.form.email,
        password: this.form.password,
        re_password: this.form.rePassword,
        ...this.form,
        type: 2,
        usercode: this.form.usercode,
      })
        .then((res) => {
          this.GET_USERINFO(res.data);
          this.bindEmail(res.data.token)
            .then((val) => {
              // console.log(val);
              Axios.registerTest({
                username: this.form.username,
                phone: this.form.phone,
                email: this.form.email,
                tokne: res.data.token,
              })
                .then((data) => {
                  this.$toast(this.$t("注册成功"));
                  setTimeout(() => {
                    this.$router.push("login");
                  }, 1000);
                })
                .catch((error) => {
                  this.codeButTexst = "发送验证码";
                  clearInterval(this.tiem);
                  if (error.code === "ECONNABORTED") {
                    this.$toast(this.$t("网络超时!"));
                  } else if (error.msg !== undefined) {
                    this.$toast(this.$t(error.msg));
                  }
                });
            })
            .catch((error) => {
              this.codeButTexst = "发送验证码";
              clearInterval(this.tiem);
              if (error.code === "ECONNABORTED") {
                this.$toast(this.$t("网络超时!"));
              } else if (error.msg !== undefined) {
                this.$toast(this.$t(error.msg));
              }
            });
          console.log(res, "=======");
          // this.GET_USERINFO(res.data);
          // this.bindEmail(res.data.token);
          this.$toast(this.$t("注册成功"));
          setTimeout(() => {
            this.$router.push("login");
          }, 1000);
        })
        .catch((error) => {
          this.codeButTexst = "发送验证码";