| | |
| | | <span |
| | | id="suffix-span-2" |
| | | ref="spanRef" |
| | | @click="sendValidationCode(state.ruleForm.phone)" |
| | | @click="sendValidationCode" |
| | | > |
| | | 获取验证码 |
| | | </span> |
| | |
| | | phoneNumberCode, |
| | | register, |
| | | exRole |
| | | } from "@/api/register/index.ts"; |
| | | } from "@/api/register/index"; |
| | | import { useRoute, useRouter } from "vue-router"; |
| | | import { message } from "@/utils/message"; |
| | | defineOptions({ |
| | |
| | | phoneVCode: "", |
| | | // tenantId: props.tenantInfo.id, |
| | | code: "", |
| | | codeId: 0, |
| | | codeId: "", |
| | | email: "", |
| | | exRoleCode: "" |
| | | }, |
| | |
| | | // 获取验证码 |
| | | const getCaptcha = async () => { |
| | | // if (!state.captchaEnabled) return; |
| | | |
| | | state.ruleForm.code = ""; |
| | | const res = await captcha(); |
| | | console.log(res); |
| | | |
| | | state.captchaImage = "data:text/html;base64," + res.result?.img; |
| | | state.expirySeconds = res.result?.expirySeconds; |
| | | state.ruleForm.codeId = res.result?.id; |
| | |
| | | const spanRef = ref(); |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return; |
| | | await formEl.validate((valid, fields) => { |
| | | await formEl.validate(valid => { |
| | | if (valid) { |
| | | state.ruleForm.account = state.ruleForm.phone; |
| | | register(state.ruleForm).then(res => { |