react_hsbc_teller 1.9.33 → 1.9.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "1.9.33",
3
+ "version": "1.9.34",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -69,7 +69,7 @@ countTimer = () => {
69
69
  }
70
70
 
71
71
  render() {
72
- console.log('22',this.props)
72
+ // console.log('22',this.props)
73
73
  return (
74
74
  <div className="test" style={{width: this.props.width,height:this.props.height}}>
75
75
  {
@@ -47,7 +47,7 @@ import Step from '../components/step/step.jsx'
47
47
  import axios from 'axios';
48
48
  import CryptoJS from "crypto-js";
49
49
 
50
- const SDK_VERISON = '1.9.33'
50
+ const SDK_VERISON = '1.9.34'
51
51
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
52
52
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
53
53
  const { Option } = Select;
@@ -4825,6 +4825,17 @@ class Video extends Component {
4825
4825
  return false;
4826
4826
  }
4827
4827
  }
4828
+ isHKPassValidTime=(value)=>{
4829
+ if (!value.split('.') || value.split('.').length < 3 || value.split('.').some(el => el == '')) return false;
4830
+ let start = new Date('2020.01.01').valueOf();
4831
+ let end = new Date('2023.12.31').valueOf();
4832
+ var time = new Date(value).valueOf();
4833
+ if(start<=time && end >= time ){
4834
+ return true;
4835
+ }else{
4836
+ return false;
4837
+ }
4838
+ }
4828
4839
  handleChangeCertificateValidity = (event) => {
4829
4840
  // 护照只有起始日期,单独处理
4830
4841
  if (this.state.documentType == 'PASSPORT_CARD' && event.target.value.split('.').length >2) {
@@ -4845,6 +4856,12 @@ class Video extends Component {
4845
4856
  certificateValidity: event.target.value,
4846
4857
  certificateValidityType: true
4847
4858
  });
4859
+ } else if (this.state.documentType == 'HK_MO_PASS_CARD' && this.isHKPassValidTime(event.target.value.split('-')[1])){
4860
+ // 疫情政策对港澳来往通行证放宽限制,有效期限从2020.1.1到2023.12.31都算有效
4861
+ this.setState({
4862
+ certificateValidity: event.target.value,
4863
+ certificateValidityType: true
4864
+ });
4848
4865
  } else {
4849
4866
  this.setState({
4850
4867
  certificateValidity: event.target.value,