react_hsbc_teller 2.0.13 → 2.0.14

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": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -492,7 +492,31 @@ class API extends Server{
492
492
  throw err;
493
493
  }
494
494
  }
495
-
495
+ /**
496
+ * 用途:查询分行名称
497
+ * @url https://api.cangdu.org/shopro/data/products
498
+ * 返回http_code为200表示成功
499
+ * @method post
500
+ * @return {promise}
501
+ */
502
+ async getBranchName(params = {}){
503
+ try{
504
+ let result = await this.axios('get', '/hsbc/getBranchName?branchCode=' + params.branchCode, params);
505
+ if(result && (result.data instanceof Object) && result.code === 200){
506
+ return result.data||[];
507
+ }else{
508
+ let err = {
509
+ tip: '分行名称获取失败',
510
+ response: result,
511
+ data: params,
512
+ // url: 'https://api.cangdu.org/shopro/data/products',
513
+ }
514
+ throw err;
515
+ }
516
+ }catch(err){
517
+ throw err;
518
+ }
519
+ }
496
520
  /**
497
521
  * 用途:人脸识别
498
522
  * @url https://elm.cangdu.org/v1/addimg/shop
@@ -53,7 +53,7 @@ import Step from '../components/step/step.jsx'
53
53
  import axios from 'axios';
54
54
  import CryptoJS from "crypto-js";
55
55
 
56
- const SDK_VERISON = '2.0.13'
56
+ const SDK_VERISON = '2.0.14'
57
57
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
58
58
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
59
59
  const { Option } = Select;
@@ -707,7 +707,7 @@ class Video extends Component {
707
707
  enable: true,
708
708
  xPosition: 640, // x 轴位置
709
709
  yPosition: 10, // y 轴位置
710
- text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.props.financialOffice || ''}`,
710
+ text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
711
711
  fontSize: 16, // 字体⼤⼩
712
712
  url: '' // ⽔印图⽚ HTTP 地址
713
713
  },
@@ -1326,10 +1326,12 @@ class Video extends Component {
1326
1326
  }
1327
1327
 
1328
1328
  }
1329
+ cobj.fillStyle = '#333333';
1330
+ cobj.fillRect(0, 0, 640, baseStartHeight)
1329
1331
  // 录制中状态
1330
1332
  if (this.state.businessRecordId) {
1331
1333
  let str = '· 录制中'
1332
- cobj.fillStyle = '#F8F2F3';
1334
+ // cobj.fillStyle = '#F8F2F3';
1333
1335
  cobj.font = "normal lighter 30px sans-serif";
1334
1336
  // cobj.fillRect(0, 0, 640, recordBoxHeight)
1335
1337
  cobj.textAlign = 'center';
@@ -3449,6 +3451,21 @@ class Video extends Component {
3449
3451
  this.roomCallBack(2, '获取tiken失败', 'SYS-01')
3450
3452
  }
3451
3453
  }
3454
+ queryBranchName = async () => {
3455
+ try {
3456
+ let result = await API.getBranchName({
3457
+ branchCode: this.props.salesBranchCode
3458
+ })
3459
+ this.setState({
3460
+ branchName: result.branchName || ''
3461
+ })
3462
+ console.log('branchName', this.state.branchName)
3463
+ } catch (err) {
3464
+ console.error(err);
3465
+
3466
+ }
3467
+ }
3468
+
3452
3469
  getRoomStatus = async data => {
3453
3470
  try {
3454
3471
  let result = await API.getRoomStatus({
@@ -3647,6 +3664,10 @@ class Video extends Component {
3647
3664
  } else {
3648
3665
  this.addToScript()
3649
3666
  }
3667
+
3668
+ if (this.props.salesBranchCode) {
3669
+ this.queryBranchName()
3670
+ }
3650
3671
  }
3651
3672
 
3652
3673
  voice = () => {