Browse Source

验证手机验证邮箱输入新的手机号和邮箱地址时不做失去焦点判断

hangb 7 năm trước cách đây
mục cha
commit
7d837770db

+ 1 - 14
components/mobile/validation/ValidationEmailStepNew.vue

@@ -56,20 +56,7 @@
             this.downToast('请填写正确的邮箱号')
             this.state.email = 'warning'
           } else {
-            this.$http.get(`/update/user/email/hasRegister`, {params: {email: this.valid.email}})
-              .then(response => {
-                if (response.data.content.hasRegister) {
-                  this.$toast({
-                    message: '该邮箱号已被注册',
-                    iconClass: 'el-icon-error'
-                  })
-                } else {
-                  this.state.email = 'success'
-                }
-              }).catch((err) => {
-                this.$indicator.close()
-                this.downToast(err.errMsg)
-              })
+            this.state.email = 'success'
           }
         }
       },

+ 1 - 11
components/mobile/validation/ValidationPhoneStepNew.vue

@@ -67,17 +67,7 @@
             this.downToast('请填写正确的手机号')
             this.state.mobile = 'warning'
           } else {
-            this.$http.get(`/update/user/mobile/hasRegister`, {params: {mobile: this.valid.mobile}})
-              .then(response => {
-                if (response.data.content.hasRegister) {
-                  this.$toast({
-                    message: '该手机号已被注册',
-                    iconClass: 'el-icon-error'
-                  })
-                } else {
-                  this.state.mobile = 'success'
-                }
-              })
+            this.state.mobile = 'success'
           }
         }
       },

+ 1 - 15
components/validation/EmailStepNew.vue

@@ -14,9 +14,7 @@
             <el-form :model="valid2" :rules="rules2" ref="valid2" label-width="100px" class="demo-ruleForm">
               <el-form-item prop="email">
                 <el-input v-model="valid2.email"
-                          v-bind:class="{ active: emailSecondExit }"
                           placeholder="新邮箱地址"></el-input>
-                <span class="tip tip-mobile" v-show="emailSecondExit">该邮箱已被注册</span>
               </el-form-item>
               <el-form-item>
                 <a class="btn finish"
@@ -50,25 +48,14 @@
         if (value === '') {
           callback(new Error('请填写正确的邮箱号'))
           this.emailSecondChecked = false
-          this.emailSecondExit = false
         } else {
           if (this.valid2.email !== '') {
             var reg = /^([\w-])+(\.\w+)*@([\w-])+((\.\w{2,3}){1,3})$/
             if (!reg.test(value)) {
               callback(new Error('请填写正确的邮箱号'))
               this.emailSecondChecked = false
-              this.emailSecondExit = false
             } else {
-              this.$http.get(`/update/user/email/hasRegister`, {params: {email: this.valid2.email}})
-                .then(response => {
-                  if (response.data.content.hasRegister) {
-                    this.emailSecondChecked = false
-                    this.emailSecondExit = true
-                  } else {
-                    this.emailSecondChecked = true
-                    this.emailSecondExit = false
-                  }
-                })
+              this.emailSecondChecked = true
             }
           }
           callback()
@@ -78,7 +65,6 @@
         isShowLoading: false,
         sendEmailSuccess: false,
         emailSecondChecked: false,
-        emailSecondExit: false,
         valid2: {
           email: ''
         },

+ 2 - 16
components/validation/PhoneStepNew.vue

@@ -14,9 +14,7 @@
             <el-form :model="valid2" :rules="rules2" ref="valid2" label-width="100px" class="demo-ruleForm">
               <el-form-item prop="mobile">
                 <el-input v-model="valid2.mobile"
-                          v-bind:class="{active: mobileSecondExit}"
                           placeholder="新手机号码"></el-input>
-                <span class="tip tip-mobile" v-show="mobileSecondExit">该手机已被注册</span>
               </el-form-item>
               <el-form-item prop="code">
                 <el-input type="text" v-model="valid2.code"
@@ -61,7 +59,6 @@
           callback(new Error('请填写正确的手机号'))
           this.getCodeBtnIsDisabled = true
           this.mobileSecondChecked = false
-          this.mobileSecondExit = false
         } else {
           if (this.valid2.mobile !== '') {
             var reg = /^1[0-9]{10}$/
@@ -69,20 +66,9 @@
               callback(new Error('请填写正确的手机号'))
               this.getCodeBtnIsDisabled = true
               this.mobileSecondChecked = false
-              this.mobileSecondExit = false
             } else {
-              this.$http.get(`/update/user/mobile/hasRegister`, {params: {mobile: this.valid2.mobile}})
-                .then(response => {
-                  if (response.data.content.hasRegister) {
-                    this.getCodeBtnIsDisabled = true
-                    this.mobileSecondChecked = false
-                    this.mobileSecondExit = true
-                  } else {
-                    this.getCodeBtnIsDisabled = false
-                    this.mobileSecondChecked = true
-                    this.mobileSecondExit = false
-                  }
-                })
+              this.getCodeBtnIsDisabled = false
+              this.mobileSecondChecked = true
             }
           }
           callback()