| | |
| | | /> |
| | | <ExInput |
| | | :placeholderText="$t('请确认密码')" |
| | | v-model="form.rePassword" |
| | | v-model="form.re_password" |
| | | typeText="password" |
| | | /> |
| | | <ExInput |
| | |
| | | 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: {}, |
| | |
| | | code: "", |
| | | username: "", |
| | | password: "", |
| | | rePassword: "", |
| | | re_password: "", |
| | | usercode: "", |
| | | }, |
| | | show: false, |
| | |
| | | onClose() { |
| | | console.log("onClose"); |
| | | }, |
| | | onSuccess() { |
| | | console.log("onSuccess"); |
| | | this.registerApi(); |
| | | async onSuccess() { |
| | | this.show = false; |
| | | // this.registerApi(); |
| | | AxiosuserCenter.invitationCode({ |
| | | email: this.form.email, |
| | | verificationCode: this.form.code, |
| | | code: this.form.usercode, |
| | | phone: this.form.phone, |
| | | }) |
| | | .then(() => { |
| | | this.registerApi(); |
| | | }) |
| | | .catch((err) => { |
| | | // this.$toast(this.$t(res.msg)); |
| | | }); |
| | | }, |
| | | onFail() { |
| | | this.msg = ""; |
| | |
| | | this.$toast(this.$t("请输入密码")); |
| | | return; |
| | | } |
| | | if (this.form.password !== this.form.rePassword) { |
| | | if (this.form.password !== this.form.re_password) { |
| | | this.$toast(this.$t("密码不一致")); |
| | | return; |
| | | } |
| | | |
| | | if (this.form.usercode == "") { |
| | | this.$toast(this.$t("请输入邀请码")); |
| | | return; |
| | | } |
| | | if (!this.agree) { |
| | | this.$toast(this.$t("请同意服务条款")); |
| | | return; |
| | | } |
| | | 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; |
| | | console.log({ |
| | | ...this.form, |
| | | type: 0, |
| | | em: this.form.email, |
| | | }); |
| | | Axios.registerUser({ |
| | | ...this.form, |
| | | type: 4, |
| | | em: this.form.email, |
| | | }) |
| | | .then((res) => { |
| | | console.log(44444, res); |
| | | 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 = "发送验证码"; |
| | | clearInterval(this.tiem); |
| | | if (error.code === "ECONNABORTED") { |
| | | this.$toast(this.$t("网络超时!")); |
| | | } else if (error.msg !== undefined) { |