| | |
| | | import img1 from "../../assets/image/slider/1.png"; |
| | | import img2 from "../../assets/image/slider/2.png"; |
| | | import { getStorage } from "@/utils/utis"; |
| | | import { log } from "qrcode/lib/core/galois-field"; |
| | | // /sendVerifyCode |
| | | export default { |
| | | props: {}, |
| | |
| | | this.$toast(this.$t("密码不一致")); |
| | | return; |
| | | } |
| | | if (this.form.usercode == "") { |
| | | this.$toast(this.$t("请输入邀请码")); |
| | | return; |
| | | } |
| | | |
| | | if (!this.agree) { |
| | | this.$toast(this.$t("请同意服务条款")); |
| | |
| | | } |
| | | this.show = true; |
| | | }, |
| | | changeIndex(index) { |
| | | this.activeIndex = index; |
| | | switch (index) { |
| | | case 0: |
| | | case 1: { |
| | | this.isArea = false; |
| | | break; |
| | | } |
| | | case 2: { |
| | | this.isArea = true; |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | |
| | | async registerApi() { |
| | | Axios.registerTest(this.form) |
| | | 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, |
| | | type: 2, |
| | | usercode: this.form.usercode, |
| | | }) |
| | | .then((res) => { |
| | | console.log(44444, res); |
| | | // this.GET_USERINFO(res.data); |
| | | this.$toast(this.$t("注册成功")); |
| | | setTimeout(() => { |
| | | this.$router.push("login"); |
| | | }, 1000); |
| | | 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)); |
| | | } |
| | | }); |
| | | }) |
| | | .catch((error) => { |
| | | this.codeButTexst = "发送验证码"; |
| | | clearInterval(this.tiem); |
| | | if (error.code === "ECONNABORTED") { |
| | | this.$toast(this.$t("网络超时!")); |
| | | } else if (error.msg !== undefined) { |