| | |
| | | :dialCode="dialCode" @selectArea="onSelectArea" :icon="icon" /> |
| | | |
| | | <ExInput :placeholderText="$t('passwordTips')" v-model="password" typeText="password" /> |
| | | <ExInput :placeholderText="$t('surePassword')" v-model="repassword" typeText="password" /> |
| | | <!-- <ExInput :placeholderText="$t('surePassword')" v-model="repassword" typeText="password" /> --> |
| | | |
| | | <ExInput :placeholderText="$t('safewordTips')" v-model="safeword" typeText="password" |
| | | v-if="activeIndex === 1" /> |
| | | <div class="inputCom" v-if="activeIndex === 1"> |
| | | <!-- <div class="inputCom" v-if="activeIndex === 1"> |
| | | <div class="iptbox inputBackground"> |
| | | <input class="inputBackground textColor" type="text" :placeholder="$t('entryVerifyCode')" |
| | | v-model="verifyCode"> |
| | |
| | | <template v-if="time">({{ time }})s</template> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <ExInput :placeholderText="$t('entryInvitCode')" v-model="invitCode" :clearBtn="false" /> |
| | | <div class="protocol textColor"> |
| | | <i @click="agreeProt"> |
| | |
| | | const safeword = ref('') |
| | | const fundPassword = ref('') |
| | | const refundPassword = ref('') |
| | | const activeIndex = ref(0) |
| | | const activeIndex = ref(1) |
| | | const typeText = ref('password') |
| | | let isArea = ref(false) |
| | | let dialCode = ref(0) |
| | |
| | | showToast(t('safewordTips')); |
| | | return |
| | | } |
| | | if (verifyCode.value.length < 6) { |
| | | showToast(t('entryVerifyTips')); |
| | | return |
| | | } |
| | | // if (verifyCode.value.length < 6) { |
| | | // showToast(t('entryVerifyTips')); |
| | | // return |
| | | // } |
| | | } else if (activeIndex.value == 2) { |
| | | if (!(/(^[1-9]\d*$)/.test(username.value))) { |
| | | showToast(t('entryPhone')); |
| | |
| | | showToast(t('passwordTips')); |
| | | return |
| | | } |
| | | if (repassword.value !== password.value) { |
| | | showToast(t('noSamePassword')); |
| | | return |
| | | } |
| | | // if (repassword.value !== password.value) { |
| | | // showToast(t('noSamePassword')); |
| | | // return |
| | | // } |
| | | if (!agree.value) { |
| | | showToast(t('agreeServiceCond')); |
| | | return |
| | |
| | | } |
| | | } |
| | | |
| | | if (activeIndex.value === 1) { |
| | | _bindEmailRegister({ |
| | | username: username.value, |
| | | password: password.value, |
| | | type: '2', // 2邮箱 |
| | | verifcode: verifyCode.value, |
| | | usercode: invitCode.value, |
| | | safeword: safeword.value |
| | | }).then((res) => { |
| | | userStore[GET_USERINFO](res) |
| | | store.state.user.userInfo = res |
| | | // 其他操作?? |
| | | router.push('/identity') |
| | | }) |
| | | } else { |
| | | _registerUser({ |
| | | userName: (activeIndex.value === 0 || activeIndex.value === 1) ? username.value : `${dialCode.value}${username.value}`, |
| | | password: password.value, |
| | | // re_password: repassword.value, |
| | | type: type.value, |
| | | userCode: invitCode.value, |
| | | }).then((res) => { |
| | | userStore[GET_USERINFO](res) |
| | | store.state.user.userInfo = res |
| | | if (activeIndex.value == 0) { |
| | | router.push('/setFond') |
| | | } else { |
| | | router.push({ name: 'verify', query: { type: activeIndex.value, account: activeIndex.value == 1 ? username.value : `${dialCode.value}${username.value}` } }) |
| | | } |
| | | }); |
| | | } |
| | | // if (activeIndex.value === 1) { |
| | | // _bindEmailRegister({ |
| | | // username: username.value, |
| | | // password: password.value, |
| | | // type: '2', // 2邮箱 |
| | | // verifcode: verifyCode.value, |
| | | // usercode: invitCode.value, |
| | | // safeword: safeword.value |
| | | // }).then((res) => { |
| | | // userStore[GET_USERINFO](res) |
| | | // store.state.user.userInfo = res |
| | | // // 其他操作?? |
| | | // router.push('/identity') |
| | | // }) |
| | | // } else { |
| | | _registerUser({ |
| | | userName: (activeIndex.value === 0 || activeIndex.value === 1) ? username.value : `${dialCode.value}${username.value}`, |
| | | password: password.value, |
| | | // re_password: repassword.value, |
| | | type: type.value, |
| | | userCode: invitCode.value, |
| | | // emailCode: verifyCode.value, |
| | | }).then((res) => { |
| | | userStore[GET_USERINFO](res) |
| | | store.state.user.userInfo = res |
| | | // if (activeIndex.value == 0) { |
| | | router.push('/setFond') |
| | | // } else { |
| | | // router.push({ name: 'verify', query: { type: activeIndex.value, account: activeIndex.value == 1 ? username.value : `${dialCode.value}${username.value}` } }) |
| | | // } |
| | | }); |
| | | // } |
| | | } |
| | | |
| | | // 语言切换 |