|
@@ -52,30 +52,30 @@ export default {
|
|
|
},
|
|
|
rules: {
|
|
|
email: [
|
|
|
- { required: true, message: 'Please enter email address.', trigger: ['change'] },
|
|
|
+ { required: true, message: 'Please enter email address.', trigger: ['blur'] },
|
|
|
{ type: 'email', message: 'Please enter a valid Email Address', trigger: [''] }
|
|
|
],
|
|
|
verificationCode: [
|
|
|
- { required: true, message: 'Please enter the verification code.', trigger: ['change'] }
|
|
|
+ { required: true, message: 'Please enter the verification code.', trigger: ['blur'] }
|
|
|
],
|
|
|
industry: [
|
|
|
- { required: true, message: 'Please select industry.', trigger: 'change' }
|
|
|
+ { required: true, message: 'Please select industry.', trigger: 'blur' }
|
|
|
],
|
|
|
organization: [
|
|
|
- { required: true, message: 'Please enter organization name.', trigger: ['change'] }
|
|
|
+ { required: true, message: 'Please enter organization name.', trigger: ['blur'] }
|
|
|
],
|
|
|
job: [
|
|
|
- { required: true, message: 'Please enter job title.', trigger: ['change'] }
|
|
|
+ { required: true, message: 'Please enter job title.', trigger: ['blur'] }
|
|
|
],
|
|
|
name: [
|
|
|
- { required: true, message: 'Please enter user name.', trigger: ['change'] }
|
|
|
+ { required: true, message: 'Please enter user name.', trigger: ['blur'] }
|
|
|
],
|
|
|
password: [
|
|
|
- { required: true, validator: validatePass, trigger: 'change' },
|
|
|
+ { required: true, validator: validatePass, trigger: 'blur' },
|
|
|
{ min: 6, max: 24, message: 'Password must between 6-24 characters', trigger: ['blur'] }
|
|
|
],
|
|
|
passwordConfirm: [
|
|
|
- { required: true, validator: validatePass2, trigger: 'change' },
|
|
|
+ { required: true, validator: validatePass2, trigger: 'blur' },
|
|
|
{ min: 6, max: 24, message: 'Password must between 6-24 characters', trigger: ['blur'] }
|
|
|
],
|
|
|
platform: [
|
|
@@ -158,6 +158,15 @@ export default {
|
|
|
duration: 5000,
|
|
|
message: 'Invited users only'
|
|
|
})
|
|
|
+ } else if (
|
|
|
+ res.data.code === 700 &&
|
|
|
+ res.data.msg === 'Organization has been created'
|
|
|
+ ) {
|
|
|
+ this.ruleForm.organization = ''
|
|
|
+ this.$message.error({
|
|
|
+ duration: 5000,
|
|
|
+ message: 'Organization has been created'
|
|
|
+ })
|
|
|
} else if (
|
|
|
res.data.code === 700 &&
|
|
|
res.data.msg === 'Password must between 6-24 characters'
|
|
@@ -197,18 +206,8 @@ export default {
|
|
|
sendEmail() {
|
|
|
const regEmail = /^([A-Za-z0-9_\-.])+@([A-Za-z0-9_\-.])+\.([A-Za-z]{2,4})$/
|
|
|
if (regEmail.test(this.ruleForm.email) && this.ruleForm.email !== '') {
|
|
|
- let timerId = setInterval(() => {
|
|
|
- this.CountDown--
|
|
|
- this.isDisabled = true
|
|
|
- this.buttonName = this.CountDown + 's'
|
|
|
- if (this.CountDown <= 0) {
|
|
|
- clearInterval(timerId)
|
|
|
- this.buttonName = 'send'
|
|
|
- this.CountDown = 60
|
|
|
- this.isDisabled = false
|
|
|
- }
|
|
|
- }, 1000)
|
|
|
if (!this.isDisabled) {
|
|
|
+ this.isDisabled = true
|
|
|
//发送邮件
|
|
|
get(
|
|
|
'/pdf-tech/auth/getVerifyCode?action=0&type=0&receiver=' +
|
|
@@ -219,17 +218,34 @@ export default {
|
|
|
message: 'Email sent successfully',
|
|
|
type: "success"
|
|
|
})
|
|
|
+ let timerId = setInterval(() => {
|
|
|
+ this.CountDown--
|
|
|
+ this.isDisabled = true
|
|
|
+ this.buttonName = this.CountDown + 's'
|
|
|
+ if (this.CountDown <= 0) {
|
|
|
+ clearInterval(timerId)
|
|
|
+ this.buttonName = 'send'
|
|
|
+ this.CountDown = 60
|
|
|
+ this.isDisabled = false
|
|
|
+ }
|
|
|
+ }, 1000)
|
|
|
+ } else if (
|
|
|
+ res.data.code === 700 &&
|
|
|
+ res.data.msg === 'Email has been created'
|
|
|
+ ) {
|
|
|
+ this.dialogVisible = true
|
|
|
+ this.isDisabled = false
|
|
|
+ } else {
|
|
|
+ this.isDisabled = false
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- } else {
|
|
|
+ } else if (!regEmail.test(this.ruleForm.email)) {
|
|
|
this.$refs.ruleForm.validateField('email')
|
|
|
}
|
|
|
},
|
|
|
changeDialogVisible() {
|
|
|
- this.dialogVisible = False
|
|
|
- this.ruleForm.email = ''
|
|
|
- this.ruleForm.verificationCode = ''
|
|
|
+ this.dialogVisible = false
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -253,7 +269,7 @@ export default {
|
|
|
</div>
|
|
|
</template>
|
|
|
</AsideInfo>
|
|
|
- <div class="w-704px bg-[#fff] flex justify-center">
|
|
|
+ <div class="w-704px bg-[#fff] flex justify-center rounded-r-16px">
|
|
|
<div class="w-592px h-auto m-auto rounded-8px p-24px bg-[#fff] loginBox">
|
|
|
<h1 class="text-24px font-500 mb-8px leading-36px">Sign up</h1>
|
|
|
<div class="text-16px leading-24px text-[#404653] pb-8px border-b-1px border-[#E2E3E5]">
|
|
@@ -269,7 +285,7 @@ export default {
|
|
|
placeholder="Please enter email address."></el-input>
|
|
|
<div
|
|
|
class="absolute top-0.5px right-1px w-80px h-31px bg-[#0773ED] text-center rounded-tr-4px rounded-br-4px font-500 text-[16px] text-[#fff] leading-32px hover:bg-[#3091FF] cursor-pointer"
|
|
|
- :class="isDisabled ? 'bgColor' : ''" @click="sendEmail">{{ buttonName }}</div>
|
|
|
+ :class="isDisabled || ruleForm.email === '' ? 'bgColor' : ''" @click="sendEmail">{{ buttonName }}</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="Verification Code" prop="verificationCode">
|
|
|
<el-input v-model="ruleForm.verificationCode"
|
|
@@ -320,8 +336,8 @@ export default {
|
|
|
</el-form-item>
|
|
|
<el-form-item label="Password Comfirm" prop="passwordConfirm" class="mt-4px">
|
|
|
<div class="flex items-center">
|
|
|
- <el-input v-model.trim="ruleForm.passwordConfirm" autocomplete="off" placeholder="Please confirm password."
|
|
|
- :type="passwordConfirmType ? '' : 'password'">
|
|
|
+ <el-input v-model.trim="ruleForm.passwordConfirm" autocomplete="off"
|
|
|
+ placeholder="Please confirm password." :type="passwordConfirmType ? '' : 'password'">
|
|
|
</el-input>
|
|
|
<span v-show="ruleForm.passwordConfirm !== ''" class="show-password"
|
|
|
@click="passwordConfirmType = !passwordConfirmType">
|
|
@@ -345,7 +361,7 @@ export default {
|
|
|
class="rounded-4px leading-38px w-[48%] border border-[#3091FF] text-center font-500 text-16px text-[#065CBC] hover:opacity-80 cursor-pointer hover:(bg-[#F5FAFF] text-[#065CBC] border-[#3091FF])">Log
|
|
|
in</a>
|
|
|
</div>
|
|
|
- <div class="flex justify-between items-start ml-200px mt-8px">
|
|
|
+ <div class="flex items-center ml-200px mt-8px">
|
|
|
<input type="checkbox" v-model="checked" name="type" />
|
|
|
<span class="ml-8px text-12px leading-16px" :class="checkBox ? 'text-[#FF5054]' : ''">Read and Agree to
|
|
|
<a href="https://www.pdfreaderpro.com/privacy-policy" target="_blank" class="text-[#0773ED]">PRIVACY
|
|
@@ -366,13 +382,11 @@ export default {
|
|
|
</div>
|
|
|
<Email />
|
|
|
<p class="mt-16px font-500 text-16px leading-24px text-[#101828]">
|
|
|
- Email has been created
|
|
|
- <br>
|
|
|
- sign in now or change your email?
|
|
|
+ Account already exists, please change the account or login directly.
|
|
|
</p>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<div class="flex justify-between">
|
|
|
- <a href="/login"
|
|
|
+ <a :href="`/login?freeEmail=${ruleForm.email}`"
|
|
|
class="rounded-4px bg-[#0773ED] leading-40px w-[48%] text-center font-500 text-16px text-[#fff] hover:bg-[#3091FF] cursor-pointer">
|
|
|
Sign in
|
|
|
</a>
|
|
@@ -395,8 +409,8 @@ export default {
|
|
|
.show-password {
|
|
|
display: inline-block;
|
|
|
position: absolute;
|
|
|
- right: 23px;
|
|
|
- top: 13px;
|
|
|
+ right: 15px;
|
|
|
+ top: 10px;
|
|
|
width: 14px;
|
|
|
height: 14px;
|
|
|
cursor: pointer;
|