react_hsbc_teller 1.9.15 → 1.9.16
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/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/pages/video/video.jsx +119 -27
package/package.json
CHANGED
|
@@ -292,7 +292,7 @@ class Video extends Component {
|
|
|
292
292
|
saveLog = (val) => {
|
|
293
293
|
axios({
|
|
294
294
|
method: 'get',
|
|
295
|
-
baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.
|
|
295
|
+
baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.16&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
|
|
296
296
|
|
|
297
297
|
}).then(res => {
|
|
298
298
|
|
|
@@ -467,6 +467,7 @@ class Video extends Component {
|
|
|
467
467
|
// 允许最大断网时间 (超过未重连, 直接关闭)
|
|
468
468
|
config_param.network_check_timeout = 10000;
|
|
469
469
|
this.test_controller.Connect(config_param)
|
|
470
|
+
this.saveLog('mrtc connect start')
|
|
470
471
|
};
|
|
471
472
|
// 初始化视频
|
|
472
473
|
ConnectMRTC = () => {
|
|
@@ -523,6 +524,7 @@ class Video extends Component {
|
|
|
523
524
|
}
|
|
524
525
|
];
|
|
525
526
|
this.test_controller.InitRoomConfig(config_param)
|
|
527
|
+
this.saveLog('mrtc InitRoomConfig start')
|
|
526
528
|
};
|
|
527
529
|
rateAll = async () => {
|
|
528
530
|
let data = ''
|
|
@@ -806,6 +808,7 @@ class Video extends Component {
|
|
|
806
808
|
// faceFailReason: result.message
|
|
807
809
|
})
|
|
808
810
|
this.errorCodeClick('face',result.code)
|
|
811
|
+
this.saveLog('meeting ID&V error, code=' + result.code )
|
|
809
812
|
}
|
|
810
813
|
|
|
811
814
|
|
|
@@ -1328,7 +1331,7 @@ class Video extends Component {
|
|
|
1328
1331
|
else if (Mival.typeId == 1220) {
|
|
1329
1332
|
// 一炒多的图片 1214
|
|
1330
1333
|
if (Mival.sessionId == this.state.sessionId) {
|
|
1331
|
-
this.saveLog('imgCallback success' + Mival.data.type)
|
|
1334
|
+
this.saveLog('imgCallback success, typeId=1220, type=' + Mival.data.type)
|
|
1332
1335
|
this.tabTitlesClick('customerScreen', 'delect')
|
|
1333
1336
|
this.props.imgCallback({
|
|
1334
1337
|
type: Mival.data.type + '',
|
|
@@ -1339,11 +1342,12 @@ class Video extends Component {
|
|
|
1339
1342
|
}
|
|
1340
1343
|
} else if (Mival.typeId == 1321) {
|
|
1341
1344
|
this.getBase64Image(Mival.fileName)
|
|
1345
|
+
this.saveLog('signCallback success, typeId=1321, fileName=' + Mival.fileName)
|
|
1342
1346
|
} else if (Mival.typeId == 1216) {
|
|
1343
1347
|
// 签字回调 1213
|
|
1344
1348
|
if (Mival.sessionId == this.state.sessionId) {
|
|
1345
1349
|
this.tabTitlesClick('customerScreen', 'delect')
|
|
1346
|
-
this.saveLog('signatureCallback success')
|
|
1350
|
+
this.saveLog('signatureCallback success, typeId=1216,')
|
|
1347
1351
|
this.props.signatureCallback({
|
|
1348
1352
|
errorType: 0
|
|
1349
1353
|
})
|
|
@@ -1353,6 +1357,7 @@ class Video extends Component {
|
|
|
1353
1357
|
// 1-开启,2-关闭
|
|
1354
1358
|
if (Mival.type == 1) {
|
|
1355
1359
|
this.switchExternal()
|
|
1360
|
+
this.saveLog('whiteboard start, typeId=1218,')
|
|
1356
1361
|
} else if (Mival.type == 2) {
|
|
1357
1362
|
if (streamShare) {
|
|
1358
1363
|
streamShare.getTracks().forEach(track => track.stop());
|
|
@@ -1371,6 +1376,7 @@ class Video extends Component {
|
|
|
1371
1376
|
isWhiteboard: false
|
|
1372
1377
|
})
|
|
1373
1378
|
}
|
|
1379
|
+
this.saveLog('whiteboard close, typeId=1218,')
|
|
1374
1380
|
}
|
|
1375
1381
|
|
|
1376
1382
|
}
|
|
@@ -1398,7 +1404,7 @@ class Video extends Component {
|
|
|
1398
1404
|
}
|
|
1399
1405
|
} else if (Mival.typeId == 121305) {
|
|
1400
1406
|
if (Mival.sessionId == this.state.sessionId) {
|
|
1401
|
-
this.saveLog('signatureCallback fail')
|
|
1407
|
+
this.saveLog('signatureCallback fail, typeId=121305, ')
|
|
1402
1408
|
this.props.signatureCallback({
|
|
1403
1409
|
errorType: -1
|
|
1404
1410
|
})
|
|
@@ -1406,7 +1412,7 @@ class Video extends Component {
|
|
|
1406
1412
|
} else if (Mival.typeId == 121405) {
|
|
1407
1413
|
if (Mival.sessionId == this.state.sessionId) {
|
|
1408
1414
|
console.log('imgCallback')
|
|
1409
|
-
this.saveLog('imgCallback fail')
|
|
1415
|
+
this.saveLog('imgCallback fail, typeId=121405, ')
|
|
1410
1416
|
this.props.imgCallback({
|
|
1411
1417
|
type: '',
|
|
1412
1418
|
file: '',
|
|
@@ -1416,6 +1422,7 @@ class Video extends Component {
|
|
|
1416
1422
|
} else if (Mival.typeId == 4001) {
|
|
1417
1423
|
// 手机端停止投屏
|
|
1418
1424
|
this.tabTitlesClick('customerScreen', 'delect')
|
|
1425
|
+
this.saveLog('app stop sharing screen, typeId=4001, ')
|
|
1419
1426
|
|
|
1420
1427
|
} else if (Mival.typeId == 1401) {
|
|
1421
1428
|
// 用户修改名字
|
|
@@ -1584,7 +1591,7 @@ class Video extends Component {
|
|
|
1584
1591
|
// 获取设备失败
|
|
1585
1592
|
this.test_controller.OnGetDevicesFailed = (code, msg) => {
|
|
1586
1593
|
console.log('获取设备失败', code, msg)
|
|
1587
|
-
this.saveLog('Failed to get device')
|
|
1594
|
+
this.saveLog('Failed to get device, code='+code)
|
|
1588
1595
|
this.state.sessionType = false
|
|
1589
1596
|
this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头', 'error')
|
|
1590
1597
|
this.roomCallBack(2, '获取设备失败', 1)
|
|
@@ -1625,6 +1632,7 @@ class Video extends Component {
|
|
|
1625
1632
|
} else {
|
|
1626
1633
|
this.test_controller.CreateRoom()
|
|
1627
1634
|
}
|
|
1635
|
+
this.saveLog('InitRoomConfig successfully')
|
|
1628
1636
|
|
|
1629
1637
|
};
|
|
1630
1638
|
// 创建房间成功
|
|
@@ -1634,6 +1642,7 @@ class Video extends Component {
|
|
|
1634
1642
|
this.state.channelId = room_id,
|
|
1635
1643
|
this.state.rtoken = rtoken
|
|
1636
1644
|
this.createRoom()
|
|
1645
|
+
this.saveLog('RM mrtc create room successfully, room_id=' + room_id)
|
|
1637
1646
|
};
|
|
1638
1647
|
// 创建房间失败
|
|
1639
1648
|
this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
|
|
@@ -1645,10 +1654,12 @@ class Video extends Component {
|
|
|
1645
1654
|
// 初始化⾳视频成功
|
|
1646
1655
|
this.test_controller.OnMediaCallSucc = (sid) => {
|
|
1647
1656
|
console.log('初始化⾳视频成功', sid)
|
|
1657
|
+
this.saveLog('OnMediaCallSucc:' + sid)
|
|
1648
1658
|
};
|
|
1649
1659
|
// 初始化音视频失败
|
|
1650
1660
|
this.test_controller.OnMediaCallFail = (err_code, err_msg) => {
|
|
1651
1661
|
console.log('初始化音视频失败', err_code, err_msg)
|
|
1662
|
+
this.saveLog('OnMediaCallFail, code=' + err_code)
|
|
1652
1663
|
};
|
|
1653
1664
|
// 音视频关闭通知
|
|
1654
1665
|
this.test_controller.OnMediaClose = (code, sid) => {
|
|
@@ -1679,10 +1690,11 @@ class Video extends Component {
|
|
|
1679
1690
|
publish_config.publish_tag = 'tag1'
|
|
1680
1691
|
this.test_controller.Publish(publish_config)
|
|
1681
1692
|
this.roomCallBack(1, '', 0)
|
|
1693
|
+
this.saveLog('mrtc join room success')
|
|
1682
1694
|
};
|
|
1683
1695
|
// 加入房间失败
|
|
1684
1696
|
this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
|
|
1685
|
-
this.saveLog('
|
|
1697
|
+
this.saveLog('mrtc join room failed,' + err_code)
|
|
1686
1698
|
console.log('加入房间失败', err_code, err_msg)
|
|
1687
1699
|
// this.setState({
|
|
1688
1700
|
// sessionType: false,
|
|
@@ -1714,12 +1726,14 @@ class Video extends Component {
|
|
|
1714
1726
|
documentError: '',
|
|
1715
1727
|
isModalVisibleCustomer: false,
|
|
1716
1728
|
})
|
|
1729
|
+
this.saveLog('mrtc OnSendTextMsgSucc:' + msgId)
|
|
1717
1730
|
}
|
|
1718
1731
|
this.test_controller.OnSendTextMsgFailed = (msgId, code, msg) => {
|
|
1719
1732
|
console.log('发送失败', msgId, code, msg)
|
|
1720
1733
|
this.setState({
|
|
1721
1734
|
documentError: '推送授权白板失败,请重试'
|
|
1722
1735
|
})
|
|
1736
|
+
this.saveLog('mrtc OnSendTextMsgFail:' + msgId +', code=' + code + ',msg=' + msg)
|
|
1723
1737
|
}
|
|
1724
1738
|
this.test_controller.OnReceiveTextMsg = (uid, msg) => {
|
|
1725
1739
|
console.log('收到手机端消息', uid, msg, JSON.parse(msg).typeId, JSON.parse(msg).data.sessionId, this.state.sessionId)
|
|
@@ -1729,6 +1743,7 @@ class Video extends Component {
|
|
|
1729
1743
|
this.customerFaceClick(this.state.customerList[this.state.customerSelect - 1])
|
|
1730
1744
|
}
|
|
1731
1745
|
}
|
|
1746
|
+
this.saveLog('mrtc OnReceiveTextMsg info:', uid, msg, JSON.parse(msg).typeId, JSON.parse(msg).data.sessionId, this.state.sessionId)
|
|
1732
1747
|
}
|
|
1733
1748
|
this.test_controller.StreamFilterHandler = async (publish_tag, stream, stream_type, publish_device, media_type) => {
|
|
1734
1749
|
console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
|
|
@@ -1893,7 +1908,7 @@ class Video extends Component {
|
|
|
1893
1908
|
};
|
|
1894
1909
|
// 发布媒体流失败
|
|
1895
1910
|
this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
|
|
1896
|
-
this.saveLog('
|
|
1911
|
+
this.saveLog('mrtc OnPublishFailed 发布失败, code=' + err_code)
|
|
1897
1912
|
console.log('Publishing media stream failed,', sid, err_code, err_msg)
|
|
1898
1913
|
if (sid == document.getElementById('publish_video1').name) {
|
|
1899
1914
|
this.state.sessionType = false
|
|
@@ -2018,6 +2033,7 @@ class Video extends Component {
|
|
|
2018
2033
|
// 推送“新加⼊房间者”给与会者
|
|
2019
2034
|
this.test_controller.OnNewJoinerIn = (participant) => {
|
|
2020
2035
|
console.log('新加⼊房间者', participant);
|
|
2036
|
+
this.saveLog('mrtc someone joined room, userId=' + participant)
|
|
2021
2037
|
this.state.isCustomer = true
|
|
2022
2038
|
};
|
|
2023
2039
|
// 推送“有新发布”给与会者
|
|
@@ -2257,6 +2273,7 @@ class Video extends Component {
|
|
|
2257
2273
|
let data = res ? res.username ? res.username : '客户' : '客户'
|
|
2258
2274
|
console.log(data)
|
|
2259
2275
|
this.messageClick((data + '已退出会议'), 'error')
|
|
2276
|
+
this.saveLog(data + ' leave room')
|
|
2260
2277
|
if (res.userType == 1) {
|
|
2261
2278
|
// 2--坐席 1--客户
|
|
2262
2279
|
this.props.userExit({
|
|
@@ -2287,6 +2304,7 @@ class Video extends Component {
|
|
|
2287
2304
|
console.log('弱网回调', bpsSend, bpsRecv, sid)
|
|
2288
2305
|
if (sid == document.getElementById('publish_video1').name) {
|
|
2289
2306
|
this.messageClick('当前网络环境较差', 'error')
|
|
2307
|
+
this.saveLog('mrtc OnNetworkWeak')
|
|
2290
2308
|
}
|
|
2291
2309
|
};
|
|
2292
2310
|
// 开始服务端录制成功
|
|
@@ -2294,6 +2312,7 @@ class Video extends Component {
|
|
|
2294
2312
|
console.log('开始服务端录制成功', record_id);
|
|
2295
2313
|
this.state.recordId = record_id
|
|
2296
2314
|
this.videoRecordCallback('1', true)
|
|
2315
|
+
this.saveLog('mrtc OnStartRemoteRecordSucc')
|
|
2297
2316
|
};
|
|
2298
2317
|
// 开始服务端录制失败
|
|
2299
2318
|
this.test_controller.OnStartRemoteRecordFailed = (
|
|
@@ -2303,11 +2322,13 @@ class Video extends Component {
|
|
|
2303
2322
|
) => {
|
|
2304
2323
|
this.videoRecordCallback('1', false)
|
|
2305
2324
|
console.log('开始服务端录制失败', record_id, err_code, err_msg)
|
|
2325
|
+
this.saveLog('mrtc OnStartRemoteRecordFailed, code='+err_code)
|
|
2306
2326
|
};
|
|
2307
2327
|
// 结束服务端录制成功
|
|
2308
2328
|
this.test_controller.OnStopRemoteRecordSucc = (recordId) => {
|
|
2309
2329
|
console.log('结束服务端录制成功', recordId);
|
|
2310
2330
|
this.videoRecordCallback('2', true)
|
|
2331
|
+
this.saveLog('mrtc OnStopRemoteRecordSucc, recordId='+recordId)
|
|
2311
2332
|
// this.endSessionValue()
|
|
2312
2333
|
// 获取服务端录制结果
|
|
2313
2334
|
};
|
|
@@ -2319,6 +2340,7 @@ class Video extends Component {
|
|
|
2319
2340
|
) => {
|
|
2320
2341
|
this.videoRecordCallback('2', false)
|
|
2321
2342
|
console.log('结束服务端录制失败', recordId, err_code, err_msg)
|
|
2343
|
+
this.saveLog('mrtc OnStopRemoteRecordFailed, err_code='+err_code)
|
|
2322
2344
|
};
|
|
2323
2345
|
// 开启浏览器录制成功
|
|
2324
2346
|
this.test_controller.OnClientStartRecordSuccess = (
|
|
@@ -2464,6 +2486,7 @@ class Video extends Component {
|
|
|
2464
2486
|
msg
|
|
2465
2487
|
) => {
|
|
2466
2488
|
console.log('切流失败通知', sid, code, msg)
|
|
2489
|
+
this.saveLog('mrtc OnChangeMediaStreamFailed, code=' + code)
|
|
2467
2490
|
if (this.state.loading) {
|
|
2468
2491
|
this.setState({
|
|
2469
2492
|
loading: false
|
|
@@ -2903,7 +2926,7 @@ class Video extends Component {
|
|
|
2903
2926
|
}
|
|
2904
2927
|
}
|
|
2905
2928
|
componentWillMount() {
|
|
2906
|
-
console.log('hsbc_teller_sdk', '1.9.
|
|
2929
|
+
console.log('hsbc_teller_sdk', '1.9.16')
|
|
2907
2930
|
let arr = []
|
|
2908
2931
|
for(let i=1;i<=12;i++){
|
|
2909
2932
|
arr.push({
|
|
@@ -3264,7 +3287,8 @@ class Video extends Component {
|
|
|
3264
3287
|
isModalVisibleSFP: false,
|
|
3265
3288
|
disabledIdCard: false,
|
|
3266
3289
|
isStaffState: 'success',
|
|
3267
|
-
loadingStaff: false
|
|
3290
|
+
loadingStaff: false,
|
|
3291
|
+
authorizeStaffId: this.state.StaffidSFP,
|
|
3268
3292
|
})
|
|
3269
3293
|
}).catch((err) => {
|
|
3270
3294
|
console.log(err)
|
|
@@ -3302,6 +3326,10 @@ class Video extends Component {
|
|
|
3302
3326
|
idCardNumber: '',
|
|
3303
3327
|
idCardName: '',
|
|
3304
3328
|
certificateValidity: '',
|
|
3329
|
+
resultIdCardName: '',
|
|
3330
|
+
resultIdCardNumber: '',
|
|
3331
|
+
resultCertificateDate: '',
|
|
3332
|
+
authorizeStaffId: ''
|
|
3305
3333
|
})
|
|
3306
3334
|
// })
|
|
3307
3335
|
} else {
|
|
@@ -3312,6 +3340,10 @@ class Video extends Component {
|
|
|
3312
3340
|
idCardNumber: this.state.idCardNumber,
|
|
3313
3341
|
customerName: this.state.customerName,
|
|
3314
3342
|
certificateValidity: this.state.certificateValidity,
|
|
3343
|
+
resultIdCardName: this.state.resultIdCardName,
|
|
3344
|
+
resultIdCardNumber: this.state.resultIdCardNumber,
|
|
3345
|
+
resultCertificateDate: this.state.resultCertificateDate,
|
|
3346
|
+
authorizeStaffId: this.state.authorizeStaffId,
|
|
3315
3347
|
}
|
|
3316
3348
|
console.log(this.state.userIdCardResults)
|
|
3317
3349
|
this.setState({
|
|
@@ -3326,6 +3358,10 @@ class Video extends Component {
|
|
|
3326
3358
|
certificateValidity: '',
|
|
3327
3359
|
idCardNumber: '',
|
|
3328
3360
|
idCardName: '',
|
|
3361
|
+
resultIdCardName: '',
|
|
3362
|
+
resultIdCardNumber: '',
|
|
3363
|
+
resultCertificateDate: '',
|
|
3364
|
+
authorizeStaffId: '',
|
|
3329
3365
|
titleModal: '身份验证',
|
|
3330
3366
|
// clickedFacial: true,
|
|
3331
3367
|
facialImg: faceImage,
|
|
@@ -3340,18 +3376,38 @@ class Video extends Component {
|
|
|
3340
3376
|
// ocr结果入库
|
|
3341
3377
|
confirmCallback = async (data) => {
|
|
3342
3378
|
try {
|
|
3343
|
-
|
|
3344
|
-
|
|
3379
|
+
// 原始证件参数
|
|
3380
|
+
let data = {
|
|
3381
|
+
idCardName: this.state.resultIdCardName,
|
|
3345
3382
|
staffId: this.props.tellerAccount,
|
|
3346
3383
|
activityId: this.props.businessNumber,
|
|
3347
3384
|
appAccount: this.state.faceCustomerUid,
|
|
3348
|
-
idCardNumber: this.state.
|
|
3385
|
+
idCardNumber: this.state.resultIdCardNumber,
|
|
3349
3386
|
sessionId: this.state.sessionId,
|
|
3350
3387
|
certificateType: this.state.certificateType,
|
|
3351
3388
|
customerName: this.state.customerName,
|
|
3352
|
-
startDate: this.state.documentType == 'PASSPORT_CARD' ? '' : this.state.
|
|
3353
|
-
endDate: this.state.documentType == 'PASSPORT_CARD' ? this.state.
|
|
3354
|
-
}
|
|
3389
|
+
startDate: this.state.documentType == 'PASSPORT_CARD' ? '' : this.state.resultCertificateDate ? this.state.resultCertificateDate.split('-')[0] : '',
|
|
3390
|
+
endDate: this.state.documentType == 'PASSPORT_CARD' ? this.state.resultCertificateDate ? this.state.resultCertificateDate.split('-')[0]: '' : this.state.resultCertificateDate ? this.state.resultCertificateDate.split('-')[1] : '',
|
|
3391
|
+
}
|
|
3392
|
+
// 添加修改后的证件参数
|
|
3393
|
+
if (this.state.authorizeStaffId) {
|
|
3394
|
+
data.authorizeStaffId = this.state.authorizeStaffId
|
|
3395
|
+
}
|
|
3396
|
+
if (this.state.idCardName != this.state.resultIdCardName) {
|
|
3397
|
+
data.reviseIdCardName = this.state.idCardName
|
|
3398
|
+
}
|
|
3399
|
+
if (this.state.idCardNumber != this.state.resultIdCardNumber) {
|
|
3400
|
+
data.reviseIdCardNumber = this.state.idCardNumber
|
|
3401
|
+
}
|
|
3402
|
+
let reviseCertificateStartDate = this.state.documentType == 'PASSPORT_CARD' ? '' : this.state.certificateValidity ? this.state.certificateValidity.split('-')[0] : '';
|
|
3403
|
+
let reviseCertificateEndDate = this.state.documentType == 'PASSPORT_CARD' ? this.state.certificateValidity ? this.state.certificateValidity.split('-')[0]: '' : this.state.certificateValidity ? this.state.certificateValidity.split('-')[1] : '';
|
|
3404
|
+
if (reviseCertificateStartDate != data.startDate) {
|
|
3405
|
+
data.reviseCertificateStartDate = reviseCertificateStartDate
|
|
3406
|
+
}
|
|
3407
|
+
if (reviseCertificateEndDate != data.endDate) {
|
|
3408
|
+
data.reviseCertificateEndDate = reviseCertificateEndDate
|
|
3409
|
+
}
|
|
3410
|
+
let result = await API.confirmCallback(data);
|
|
3355
3411
|
console.log('confirmCallback', result)
|
|
3356
3412
|
if (result.code == 200) {
|
|
3357
3413
|
// console.log(data)
|
|
@@ -3401,6 +3457,8 @@ class Video extends Component {
|
|
|
3401
3457
|
this.setState({
|
|
3402
3458
|
idCardNumber: result.data.idCardNumber,
|
|
3403
3459
|
idCardName: result.data.idCardName,
|
|
3460
|
+
resultIdCardName: result.data.idCardName,
|
|
3461
|
+
resultIdCardNumber: result.data.idCardNumber,
|
|
3404
3462
|
loadingFace: false,
|
|
3405
3463
|
cardFailReason: '',
|
|
3406
3464
|
cardResuly: 'success',
|
|
@@ -3409,6 +3467,8 @@ class Video extends Component {
|
|
|
3409
3467
|
this.setState({
|
|
3410
3468
|
idCardNumber: result.data.idCardNumber,
|
|
3411
3469
|
idCardName: result.data.idCardName,
|
|
3470
|
+
resultIdCardName: result.data.idCardName,
|
|
3471
|
+
resultIdCardNumber: result.data.idCardNumber,
|
|
3412
3472
|
certificateValidityType: false,
|
|
3413
3473
|
cardFailReason: '证件已过期[#'+result.code+'#]',
|
|
3414
3474
|
loadingFace: false,
|
|
@@ -3420,7 +3480,9 @@ class Video extends Component {
|
|
|
3420
3480
|
this.setState({
|
|
3421
3481
|
// isModalVisibleFacial: false
|
|
3422
3482
|
idCardNumber: result.data.idCardNumber,
|
|
3423
|
-
idCardName: result.data.idCardName
|
|
3483
|
+
idCardName: result.data.idCardName,
|
|
3484
|
+
resultIdCardName: result.data.idCardName,
|
|
3485
|
+
resultIdCardNumber: result.data.idCardNumber,
|
|
3424
3486
|
})
|
|
3425
3487
|
this.ocrCallback(2)
|
|
3426
3488
|
}
|
|
@@ -3438,6 +3500,7 @@ class Video extends Component {
|
|
|
3438
3500
|
if(this.state.idCardName && this.dateNewTime(endDate)) {
|
|
3439
3501
|
this.setState({
|
|
3440
3502
|
certificateValidity: startDate + '-' + endDate,
|
|
3503
|
+
resultCertificateDate: startDate + '-' + endDate,
|
|
3441
3504
|
loadingFace: false,
|
|
3442
3505
|
cardFailReason: '',
|
|
3443
3506
|
cardResuly: 'success',
|
|
@@ -3446,6 +3509,7 @@ class Video extends Component {
|
|
|
3446
3509
|
} else if(this.state.idCardName && !this.dateNewTime(endDate)) {
|
|
3447
3510
|
this.setState({
|
|
3448
3511
|
certificateValidity: startDate + '-' + endDate,
|
|
3512
|
+
resultCertificateDate: startDate + '-' + endDate,
|
|
3449
3513
|
loadingFace: false,
|
|
3450
3514
|
certificateValidityType: false,
|
|
3451
3515
|
cardFailReason: '证件已过期[#'+result.code+'#]',
|
|
@@ -3484,13 +3548,16 @@ class Video extends Component {
|
|
|
3484
3548
|
this.setState({
|
|
3485
3549
|
// isModalVisibleFacial: false
|
|
3486
3550
|
idCardNumber: result.data.resident.idNum,
|
|
3487
|
-
idCardName: result.data.resident.name
|
|
3551
|
+
idCardName: result.data.resident.name,
|
|
3552
|
+
resultIdCardName: result.data.resident.name,
|
|
3553
|
+
resultIdCardNumber: result.data.resident.idNum,
|
|
3488
3554
|
})
|
|
3489
3555
|
this.ocrCallback(2)
|
|
3490
3556
|
} else if (result.data.side == 'back' && val != 1) {
|
|
3491
3557
|
console.log(result.data.resident.startDate, result.data.resident.endDate)
|
|
3492
3558
|
this.setState({
|
|
3493
3559
|
certificateValidity: result.data.resident.startDate + '-' + result.data.resident.endDate,
|
|
3560
|
+
resultCertificateDate: result.data.resident.startDate + '-' + result.data.resident.endDate,
|
|
3494
3561
|
loadingFace: false,
|
|
3495
3562
|
cardFailReason: result.code == 40002 ? '证件已过期[#'+result.code+'#]' : '',
|
|
3496
3563
|
certificateValidityType: result.code == 40002 ? false : true,
|
|
@@ -3508,7 +3575,10 @@ class Video extends Component {
|
|
|
3508
3575
|
this.setState({
|
|
3509
3576
|
idCardNumber: result.data.passport.passportCode,
|
|
3510
3577
|
idCardName: result.data.passport.nameEN,
|
|
3578
|
+
resultIdCardName: result.data.passport.nameEN,
|
|
3579
|
+
resultIdCardNumber: result.data.passport.passportCode,
|
|
3511
3580
|
certificateValidity: result.data.passport.expiryDate,
|
|
3581
|
+
resultCertificateDate: result.data.passport.expiryDate,
|
|
3512
3582
|
loadingFace: false,
|
|
3513
3583
|
cardFailReason: result.code == 30002 ? '证件已过期[#'+result.code+'#]' : '',
|
|
3514
3584
|
certificateValidityType: result.code == 30002 ? false : true,
|
|
@@ -3520,7 +3590,10 @@ class Video extends Component {
|
|
|
3520
3590
|
this.setState({
|
|
3521
3591
|
idCardNumber: result.data.permission.cardNum,
|
|
3522
3592
|
idCardName: result.data.permission.nameEN,
|
|
3593
|
+
resultIdCardName: result.data.permission.nameEN,
|
|
3594
|
+
resultIdCardNumber: result.data.permission.cardNum,
|
|
3523
3595
|
certificateValidity: result.data.permission.validDate,
|
|
3596
|
+
resultCertificateDate: result.data.permission.validDate,
|
|
3524
3597
|
loadingFace: false,
|
|
3525
3598
|
cardFailReason: result.code == 50002 ? '证件已过期[#'+result.code+'#]' : '',
|
|
3526
3599
|
certificateValidityType: result.code == 50002 ? false : true,
|
|
@@ -3593,18 +3666,38 @@ class Video extends Component {
|
|
|
3593
3666
|
}
|
|
3594
3667
|
this.handleCancelFacial();
|
|
3595
3668
|
try {
|
|
3596
|
-
|
|
3597
|
-
|
|
3669
|
+
// 原始证件参数
|
|
3670
|
+
let data = {
|
|
3671
|
+
idCardName: userInfo.resultIdCardName,
|
|
3598
3672
|
staffId: this.props.tellerAccount,
|
|
3599
3673
|
activityId: this.props.businessNumber,
|
|
3600
3674
|
appAccount: this.state.faceCustomerUid,
|
|
3601
|
-
idCardNumber: userInfo.
|
|
3675
|
+
idCardNumber: userInfo.resultIdCardNumber,
|
|
3602
3676
|
sessionId: this.state.sessionId,
|
|
3603
3677
|
certificateType: 'ID_CARD',
|
|
3604
3678
|
customerName: userInfo.customerName,
|
|
3605
|
-
startDate: userInfo.
|
|
3606
|
-
endDate: userInfo.
|
|
3607
|
-
}
|
|
3679
|
+
startDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[0] : '',
|
|
3680
|
+
endDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[1] : '',
|
|
3681
|
+
}
|
|
3682
|
+
// 添加修改后的证件参数
|
|
3683
|
+
if (userInfo.authorizeStaffId) {
|
|
3684
|
+
data.authorizeStaffId = userInfo.authorizeStaffId
|
|
3685
|
+
}
|
|
3686
|
+
if (userInfo.idCardName != userInfo.resultIdCardName) {
|
|
3687
|
+
data.reviseIdCardName = userInfo.idCardName
|
|
3688
|
+
}
|
|
3689
|
+
if (userInfo.idCardNumber != userInfo.resultIdCardNumber) {
|
|
3690
|
+
data.reviseIdCardNumber = userInfo.idCardNumber
|
|
3691
|
+
}
|
|
3692
|
+
let reviseCertificateStartDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[0] : '';
|
|
3693
|
+
let reviseCertificateEndDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[1] : '';
|
|
3694
|
+
if (reviseCertificateStartDate != data.startDate) {
|
|
3695
|
+
data.reviseCertificateStartDate = reviseCertificateStartDate
|
|
3696
|
+
}
|
|
3697
|
+
if (reviseCertificateEndDate != data.endDate) {
|
|
3698
|
+
data.reviseCertificateEndDate = reviseCertificateEndDate
|
|
3699
|
+
}
|
|
3700
|
+
let result = await API.confirmCallback(data);
|
|
3608
3701
|
console.log('confirmCallback', result)
|
|
3609
3702
|
if (result.code == 200) {
|
|
3610
3703
|
// console.log(data)
|
|
@@ -4783,8 +4876,7 @@ class Video extends Component {
|
|
|
4783
4876
|
|
|
4784
4877
|
return a.idIndex - b.idIndex;
|
|
4785
4878
|
})
|
|
4786
|
-
console.log('排序后list');
|
|
4787
|
-
console.log(list);
|
|
4879
|
+
console.log('排序后list', list);
|
|
4788
4880
|
for(let i=0;i<12;i++){
|
|
4789
4881
|
for(let j=0;j<12;j++){
|
|
4790
4882
|
if (list[j].videoName == this.state.videoList[i].videoName) {
|
|
@@ -4935,7 +5027,7 @@ class Video extends Component {
|
|
|
4935
5027
|
<CanvasHome zIndexNum={this.state.zIndexNum} style={{ width: isGraffiti ? this.state.widthVideo + 'px' : this.state.whiteboardWidth + 'Px', height: this.state.whiteboardHeight + 'Px', top: this.state.whiteboardTop + 'Px', left: isGraffiti ? this.state.leftVideo + 'px' : this.state.whiteboardLeft + 'Px' }}>
|
|
4936
5028
|
{this.state.operateShow &&
|
|
4937
5029
|
<OpreateDiv id="operate">
|
|
4938
|
-
<span style={{ color: this.state.selectSpan == 'pen' ? '#1890ff' : '#333' }} onClick={() => this.setTool('pen')}
|
|
5030
|
+
<span style={{ color: this.state.selectSpan == 'pen' ? '#1890ff' : '#333' }} onClick={() => this.setTool('pen')}>黑笔</span>
|
|
4939
5031
|
<span style={{ color: this.state.selectSpan == 'redPen' ? '#1890ff' : '#333' }} onClick={() => this.setStrokeColor()}>红笔</span>
|
|
4940
5032
|
<span style={{ color: this.state.selectSpan == 'eraser' ? '#1890ff' : '#333' }} onClick={() => this.setTool('eraser')}>橡皮</span>
|
|
4941
5033
|
<span onClick={() => this.setOpreate('undo')}>撤销</span>
|