提交 34ac30ae27beebf1158591e3de507ee4f30805f7

作者 pangy
1 个父辈 ed0936ac

身份证识别回填

@@ -849,57 +849,39 @@ Page({ @@ -849,57 +849,39 @@ Page({
849 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-0' + id_info.birthday.day; 849 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-0' + id_info.birthday.day;
850 } 850 }
851 851
852 - if (that.data.name.length > 0 && id_info.name != that.data.name) {  
853 - that.showtoast("姓名冲突")  
854 - id_error = true  
855 - return  
856 - }  
857 - if (that.data.card_number.length > 0 && id_info.id_card_number != that.data.card_number) {  
858 - that.showtoast("证照号码冲突")  
859 - id_error = true  
860 - return  
861 - }  
862 - // children_id_card_no  
863 - // spouse_id_card_no  
864 - // older_idno  
865 - // long_birth_date: Date.parse(new Date(birth_day)) / 1000,  
866 - // that.data.genderData.selected = id_info.gender  
867 - // that.data.birthDate.selected = birth_day  
868 - console.log('name***card_number', that.data.name + '***' + that.data.card_number)  
869 -  
870 - if (this.idcard_belong == 'children_id_card_no') {  
871 - this.data.commonbirthDate.selected = birth_day  
872 - this.data.commonbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000) 852 + if (that.idcard_belong == 'children_id_card_no') {
  853 + that.data.commonbirthDate.selected = birth_day
  854 + that.data.commonbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000)
873 data = { 855 data = {
874 children_id_card_no: id_info.id_card_number, 856 children_id_card_no: id_info.id_card_number,
875 children_name: id_info.name, 857 children_name: id_info.name,
876 - commonbirthDate: this.data.commonbirthDate 858 + commonbirthDate: that.data.commonbirthDate
877 } 859 }
878 - } else if (this.idcard_belong == 'spouse_id_card_no') {  
879 - this.data.loverbirthDate.selected = birth_day  
880 - this.data.loverbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000) 860 + } else if (that.idcard_belong == 'spouse_id_card_no') {
  861 + that.data.loverbirthDate.selected = birth_day
  862 + that.data.loverbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000)
881 data = { 863 data = {
882 spouse_id_card_no: id_info.id_card_number, 864 spouse_id_card_no: id_info.id_card_number,
883 spouse_name: id_info.name, 865 spouse_name: id_info.name,
884 - loverbirthDate: this.data.loverbirthDate 866 + loverbirthDate: that.data.loverbirthDate
885 } 867 }
886 - } else if (this.idcard_belong == 'older_id_card_no') {  
887 - this.data.olderbirthDate.selected = birth_day  
888 - this.data.olderbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000) 868 + } else if (that.idcard_belong == 'older_id_card_no') {
  869 + that.data.olderbirthDate.selected = birth_day
  870 + that.data.olderbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000)
889 data = { 871 data = {
890 id_card_no: id_info.id_card_number, 872 id_card_no: id_info.id_card_number,
891 supported_name: id_info.name, 873 supported_name: id_info.name,
892 - olderbirthDate: this.data.olderbirthDate 874 + olderbirthDate: that.data.olderbirthDate
893 } 875 }
894 - } else if (this.idcard_belong == 'medical_id_card_no') {  
895 - this.data.commonbirthDate.selected = birth_day  
896 - this.data.commonbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000) 876 + } else if (that.idcard_belong == 'medical_id_card_no') {
  877 + that.data.commonbirthDate.selected = birth_day
  878 + that.data.commonbirthDate.datelong = (Date.parse(new Date(birth_day)) / 1000)
897 data = { 879 data = {
898 id_card_no: id_info.id_card_number, 880 id_card_no: id_info.id_card_number,
899 - commonbirthDate: this.data.commonbirthDate 881 + commonbirthDate: that.data.commonbirthDate
900 } 882 }
901 } 883 }
902 - this.setData(data) 884 + that.setData(data)
903 console.log('-cardtypeData--', that.data.cardtypeData) 885 console.log('-cardtypeData--', that.data.cardtypeData)
904 886
905 } 887 }
注册登录 后发表评论