不生效的校验
This commit is contained in:
		@@ -349,7 +349,7 @@ export default {
 | 
			
		||||
  watch: {
 | 
			
		||||
    startAreaId: {
 | 
			
		||||
      handler(v) {
 | 
			
		||||
        if(v.length) {
 | 
			
		||||
        if(v?.length) {
 | 
			
		||||
          this.getRiskLevel(v)
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@@ -460,14 +460,20 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    submit() {
 | 
			
		||||
      if (!this.form.idNumber) {
 | 
			
		||||
      if(!this.form.idNumber) {
 | 
			
		||||
        return this.$toast('请输入身份证号')
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)) {
 | 
			
		||||
        return this.$toast('请输入正确的身份证账号')
 | 
			
		||||
      if(this.form.idNumber) {
 | 
			
		||||
        let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
 | 
			
		||||
        if (!reg.test(this.form.idNumber)) {
 | 
			
		||||
          return this.$toast('请输入正确的身份证账号')
 | 
			
		||||
        } 
 | 
			
		||||
        else {
 | 
			
		||||
          console.log('没有生效');
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
      if (!this.form.name) {
 | 
			
		||||
        return this.$toast('请输入姓名')
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user