| | |
| | | style="margin-bottom: 20px" |
| | | v-for="(val, index) in funcArr" |
| | | :key="index" |
| | | @click="clickChange(index)" |
| | | @click="clickChange(index+1)" |
| | | > |
| | | <div |
| | | :class="[recordActive == index ? 'active' : '', 'css-1cahv52']" |
| | | :class="[recordActive == index+1 ? 'active' : '', 'css-1cahv52']" |
| | | > |
| | | {{ val }} |
| | | </div> |
| | |
| | | ? t('qsr_shoujihao') |
| | | : recordActive == 1 |
| | | ? t('qsr_youxiang') |
| | | : t('qsr_zhanghao6wei') |
| | | : t('qsr_zhanghao6weiD') |
| | | " |
| | | clearable |
| | | v-model.trim="register.username" |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 6.验证码 Verification code --> |
| | | <!-- <!– 6.验证码 Verification code –> |
| | | <div |
| | | class="css-15651n7" |
| | | v-if="recordActive == 0 || recordActive == 1" |
| | |
| | | </template> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <!-- 注册 --> |
| | | <button |
| | | data-bn-type="button" |
| | |
| | | </button> |
| | | </div> |
| | | <div class="css-jhkvqo"> |
| | | {{ t("zhuceguo") }}? |
| | | {{ t("zhuceguo") }} |
| | | <div class="css-r3o9q9" @click="goLogin"> |
| | | {{ t("denglu") }} |
| | | </div> |
| | |
| | | type.value = 1; |
| | | } else if (index == 1) { |
| | | type.value = 2; |
| | | }else if (index == 2){ |
| | | type.value = 1; |
| | | } |
| | | register.value = { |
| | | username: "", |
| | |
| | | return; |
| | | } |
| | | |
| | | if ([0, 1].includes(recordActive.value) && !verifcode) { |
| | | ElMessage.error(t("qsr_yanzhengma")); |
| | | return; |
| | | } |
| | | // if ([0, 1].includes(recordActive.value) && !verifcode) { |
| | | // ElMessage.error(t("qsr_yanzhengma")); |
| | | // return; |
| | | // } |
| | | |
| | | // 以上为验证不为空 |
| | | // 以下验证数据对不对 |
| | |
| | | Axios.resgister({ |
| | | username: account, |
| | | password, |
| | | verifcode, |
| | | re_password: password, |
| | | // verifcode, |
| | | usercode, |
| | | safeword, |
| | | type: type.value, |
| | | }).then((res) => { |
| | | // 注册成功,存储账户信息 |
| | | if (res.code == 0) { |
| | | ElMessage.success(t("message.home.zhucechenggong")); |
| | | setStorage("spToken", res.data.token); |
| | | setStorage("username", res.data.username); |
| | | userStore.updateUserInfo(res.data); |
| | | router.push("/idSet"); //去实名认证 |
| | | Axios.setSafewordReg({safeword}).then((response) => { |
| | | console.log(response) |
| | | ElMessage.success(t("message.home.zhucechenggong")); |
| | | router.push("/idSet"); //去实名认证 |
| | | }) |
| | | } |
| | | }); |
| | | } else if (recordActive.value == 2) { |
| | | Axios.imageVerifica().then((res) => { |
| | | Axios.resgister({ |
| | | username: account, |
| | | password, |
| | | re_password: password, |
| | | // verifcode, |
| | | usercode, |
| | | type: 3, |
| | | }).then((res) => { |
| | | if (res.code == "0") { |
| | | ImageVerRef.value.isShowFunc(res.data, { |
| | | setStorage("spToken", res.data.token); |
| | | setStorage("username", res.data.username); |
| | | userStore.updateUserInfo(res.data); |
| | | Axios.setSafewordReg({safeword}).then((response) => { |
| | | console.log(response) |
| | | ElMessage.success(t("message.home.zhucechenggong")); |
| | | router.push("/idSet"); //去实名认证 |
| | | }) |
| | | /* ImageVerRef.value.isShowFunc(res.data, { |
| | | username: account, |
| | | password, |
| | | usercode, |
| | | safeword, |
| | | }); |
| | | });*/ |
| | | } |
| | | }); |
| | | } |