react_hsbc_teller 1.6.3 → 1.6.4

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.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -2,6 +2,25 @@ import Server from './server';
2
2
 
3
3
  class API extends Server{
4
4
 
5
+ async confirmCallback(params = {}){
6
+ // return this.axios('get', '/lang/select/2', params);
7
+ try{
8
+ let result = await this.axios('post', '/hsbc/identify/ocr/confirmCallback', params);
9
+ if(result && (result.data instanceof Object) && result.code === 200){
10
+ return result||[];
11
+ }else{
12
+ let err = {
13
+ tip: '服务异常',
14
+ response: result,
15
+ data: params,
16
+ // url: 'https://api.cangdu.org/shopro/data/products',
17
+ }
18
+ throw err;
19
+ }
20
+ }catch(err){
21
+ throw err;
22
+ }
23
+ }
5
24
  async updateMeetingInfo(params = {}){
6
25
  // return this.axios('get', '/lang/select/2', params);
7
26
  try{
@@ -147,19 +147,19 @@ export default class foot extends Component {
147
147
  开启视频画中画
148
148
  </div>
149
149
  </div>
150
+ }
151
+ {
152
+ item == 'BEAUTY' && <div className="one" onClick={this.beautyClick.bind(this)}>
153
+ <img className="imgClass" src={require("../../assets/img/meiyan.png").default} alt="" />
154
+ <div className="text">
155
+ {beautyName}
156
+ </div>
157
+ </div>
150
158
  }
151
159
  </div>
152
160
 
153
161
  })
154
162
  }
155
- {
156
- <div className="one" onClick={this.beautyClick.bind(this)}>
157
- <img className="imgClass" src={require("../../assets/img/meiyan.png").default} alt="" />
158
- <div className="text">
159
- {beautyName}
160
- </div>
161
- </div>
162
- }
163
163
  </div>
164
164
  );
165
165
  return (
@@ -212,6 +212,8 @@ class Video extends Component {
212
212
  }
213
213
  ],
214
214
  shareMaskState: false,
215
+ idCardName: '',
216
+ idCardNumber: ''
215
217
  };
216
218
  // eslint-disable-next-line no-undef
217
219
  test_controller = '';
@@ -3816,6 +3818,28 @@ userType:'1'
3816
3818
  isModalVisibleEnd: false
3817
3819
  })
3818
3820
  };
3821
+ confirmCallback=async()=>{
3822
+ try {
3823
+ let result = await API.ocrCallback({
3824
+ idCardName: this.state.idCardName,
3825
+ staffId: this.props.tellerAccount,
3826
+ activityId: this.props.businessNumber,
3827
+ appAccount: this.state.faceCustomerUid,
3828
+ idCardNumber: this.state.idCardNumber,
3829
+ });
3830
+ if (result.code == 200) {
3831
+ this.setState({
3832
+ isModalVisibleFacial: false,
3833
+ idCardNumber: '',
3834
+ idCardName: ''
3835
+ })
3836
+ } else {
3837
+ this.messageClick('保持信息失败','error')
3838
+ }
3839
+ } catch (err) {
3840
+ this.messageClick('保持信息失败','error')
3841
+ }
3842
+ }
3819
3843
  ocrCallback= async () => {
3820
3844
  try {
3821
3845
  let result = await API.ocrCallback({
@@ -3840,6 +3864,8 @@ userType:'1'
3840
3864
  });
3841
3865
  this.setState({
3842
3866
  isModalVisibleFacial: false
3867
+ // idCardNumber: result.data.idCardNumber,
3868
+ // idCardName: result.data.idCardName
3843
3869
  })
3844
3870
  } else {
3845
3871
  this.messageClick('识别失败','error')
@@ -4288,7 +4314,6 @@ userType:'1'
4288
4314
  function loop() {
4289
4315
  if (!$this.paused && !$this.ended) {
4290
4316
  // if(!that.state.tabTitles.find(el=>el.value == 'customerScreen')) {
4291
- console.log('addEventListener',x, y, width, height)
4292
4317
  cobj.drawImage(videoMedia, x, y, width, height, 0, 0,960, 540);
4293
4318
  // } else {
4294
4319
  // cobj.fillStyle = 'rgb(0 0 0)'
@@ -4594,6 +4619,12 @@ userType:'1'
4594
4619
  },100)
4595
4620
 
4596
4621
  }
4622
+ handleChangeIdCardName = (event) => {
4623
+ this.setState({idCardName: event.target.value});
4624
+ }
4625
+ handleChangeIdCardNumber = (event) => {
4626
+ this.setState({idCardNumber: event.target.value});
4627
+ }
4597
4628
  componentDidUpdate(prevProps){
4598
4629
  console.log('componentDidUpdate',prevProps,prevProps.shareMask,this.props.shareMask)
4599
4630
  if(this.props.shareMask != prevProps.shareMask) {
@@ -5252,10 +5283,13 @@ userType:'1'
5252
5283
  <div className='endModal'>是否要结束并退出会议?</div>
5253
5284
  </Modal>
5254
5285
  <Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
5255
- <div key='facial'>
5286
+ !this.state.idCardName && <div key='facial'>
5256
5287
  <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
5257
5288
  <Button className="modelButtonCancel" onClick={this.sgsinImage}>重新截图</Button>
5258
5289
  <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkFacial}>确定</Button>
5290
+ </div>,
5291
+ this.state.idCardName && <div key='facial'>
5292
+ <Button className="modelButtonOk" type="primary" danger onClick={this.confirmCallback}>确认</Button>
5259
5293
  </div>
5260
5294
  ]}>
5261
5295
  <div className="faceBody">
@@ -5265,9 +5299,18 @@ userType:'1'
5265
5299
  <Option value="2">反面</Option>
5266
5300
  </Select>
5267
5301
  } */}
5268
- <div>
5269
- <img className="faceImg" src={this.state.facialImg} alt=""></img>
5302
+ {
5303
+ !this.state.idCardName &&<div className='faceCardImg'>
5304
+ <img className="faceImg" src={this.state.facialImg} alt=""></img>
5305
+ </div>
5306
+ }
5307
+ {
5308
+ this.state.idCardName &&<div className='resuleCard'>
5309
+ <div><span>客户姓名</span> <input type="text" value={this.state.idCardName} onChange={this.handleChangeIdCardName} /></div>
5310
+ <div><span>身份证号</span> <input type="text" value={this.state.idCardNumber} onChange={this.handleChangeIdCardNumber} /></div>
5270
5311
  </div>
5312
+ }
5313
+
5271
5314
 
5272
5315
  </div>
5273
5316
  </Modal>
@@ -5384,7 +5427,7 @@ sessionId: "",
5384
5427
  microphoneSize: 25,
5385
5428
  fontSize: '14',
5386
5429
  fontFamily: 'auto',
5387
- menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP'],
5430
+ menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP', 'BEAUTY'],
5388
5431
  customLeaveRoom: '客户离开房间',
5389
5432
  meetingInfo: {
5390
5433
  title: '--',
@@ -155,6 +155,26 @@
155
155
  }
156
156
  .faceBody{
157
157
  text-align: center;
158
+ height: 200px;
159
+ .faceCardImg{
160
+ height: 100%;
161
+ }
162
+ .resuleCard{
163
+ text-align: -webkit-left;
164
+ padding: 25Px 20px;
165
+ div{
166
+ font-size: 16Px;
167
+ color: #646464;
168
+ margin: 20Px;
169
+ input{
170
+ border: #DCDCDC 1px solid;
171
+ width: 15rem;
172
+ height: 2.5rem;
173
+ line-height: 2.5rem;
174
+ margin-left: 15px;
175
+ }
176
+ }
177
+ }
158
178
  }
159
179
  .content{
160
180
  height: 200px;