| | |
| | | <van-icon :name="repwdVisible ? 'eye-o' : 'closed-eye'" size="20" /> |
| | | </span> |
| | | </div> |
| | | <!-- Referral Code (optional) --> |
| | | <!-- Referral Code --> |
| | | <div class="reg-field"> |
| | | <input |
| | | v-model="invitCode" |
| | | type="text" |
| | | class="reg-input" |
| | | :placeholder="`${$t('entryInvitCode')} (optional)`" |
| | | :placeholder="$t('entryInvitCode')" |
| | | /> |
| | | </div> |
| | | |
| | |
| | | showToast(t('entryPassword')); |
| | | return; |
| | | } |
| | | if (!validatePassword(password.value)) { |
| | | if (!password.value || password.value.length < 6 || password.value.length > 16) { |
| | | showToast(t('passwordTips')); |
| | | return; |
| | | } |
| | | if (repassword.value !== password.value) { |
| | | showToast(t('noSamePassword')); |
| | | return; |
| | | } |
| | | if (!invitCode.value.trim()) { |
| | | showToast(t('请输入邀请码')); |
| | | return; |
| | | } |
| | | if (!agree.value) { |
| | | showToast(t('agreeServiceCond')); |
| | | return; |
| | | } |
| | | return; |
| | | } |
| | | // 推荐码可选,无则传空 |
| | | registerApi(); |
| | | }; |
| | | |
| | |
| | | password: password.value, |
| | | type: '2', |
| | | verifcode: verifyCode.value, |
| | | usercode: invitCode.value.trim() || '', |
| | | usercode: invitCode.value.trim(), |
| | | safeword: password.value |
| | | }).then((res) => { |
| | | userStore[GET_USERINFO](res); |
| | | store.state.user.userInfo = res; |
| | | router.push('/login'); |
| | | }).catch((err) => { |
| | | showToast(err?.msg || t('register')); |
| | | showToast(err); |
| | | }); |
| | | }; |
| | | |
| | |
| | | } |
| | | |
| | | .reg-logo-wrap { |
| | | width: 72px; |
| | | height: 72px; |
| | | border-radius: 18px; |
| | | background: linear-gradient(135deg, #2c1a5c 0%, #5a37a5 100%); |
| | | width: 100px; |
| | | height: 100%; |
| | | border-radius: 6px; |
| | | // background: linear-gradient(135deg, #2c1a5c 0%, #5a37a5 100%); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-bottom: 24px; |
| | | } |
| | | .reg-logo { |
| | | width: 44px; |
| | | height: 44px; |
| | | width: 100%; |
| | | height: 100%; |
| | | border-radius: 6px; |
| | | object-fit: contain; |
| | | } |
| | | |