react_hsbc_teller 0.2.0 → 0.2.1

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": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -24,7 +24,7 @@ export default class Server {
24
24
  _option = {
25
25
  method,
26
26
  url,
27
- baseURL: envconfig.baseURL,
27
+ baseURL: window.sessionStorage.getItem('baseURL'),
28
28
  timeout: 30000,
29
29
  params: null,
30
30
  data: params,
@@ -50,6 +50,9 @@ export default class foot extends Component {
50
50
  })
51
51
  this.props.customerFaceClick(item)
52
52
  }
53
+ switchExternal=()=>{
54
+ this.props.switchExternal()
55
+ }
53
56
  render() {
54
57
  const {isTranscribing,img,cameraImg,screenName,suspendName,customerList} = this.props
55
58
  const content = (
@@ -132,6 +135,12 @@ export default class foot extends Component {
132
135
  画中画
133
136
  </div>
134
137
  </div>
138
+ <div className="one" onClick={this.switchExternal.bind(this)}>
139
+ <img src={require("../../assets/img/huazhonghua.png").default} alt="" />
140
+ <div className="text">
141
+ 切换外部
142
+ </div>
143
+ </div>
135
144
  </div>
136
145
  <div className="total totalThree">
137
146
  <button className="buttonClass" onClick={this.endSession.bind(this)}>
@@ -24,6 +24,7 @@ class Main extends Component {
24
24
  window.localStorage.setItem("langData", JSON.stringify(Object.assign(res)));
25
25
  }
26
26
  componentWillMount() {
27
+ window.sessionStorage.setItem('baseURL',this.props.baseURL)
27
28
  localStorage.setItem("a_lang", this.props.lang)
28
29
  if (localStorage.getItem("langData")){
29
30
  this.setState({langPackage: JSON.parse(localStorage.getItem("langData"))})
@@ -34,6 +35,7 @@ class Main extends Component {
34
35
 
35
36
  render() {
36
37
  const lang = this.props.lang
38
+
37
39
  // console.log(this.state.langPackage[lang])
38
40
  return (
39
41
  <IntlProvider locale={lang} messages={this.state.langPackage[lang]}>
@@ -42,5 +44,9 @@ class Main extends Component {
42
44
  );
43
45
  }
44
46
  }
47
+ Main.defaultProps = {
48
+ lang: 'zh',
49
+ baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
45
50
 
51
+ }
46
52
  export default Main
@@ -29,6 +29,7 @@ const LEAVE_TYPE = {
29
29
  class Video extends Component {
30
30
  signCanvas = React.createRef();
31
31
  state = {
32
+ isPDF: false,
32
33
  loading: false,
33
34
  isModalVisibleSign: false,
34
35
  titleModal: '人脸识别',
@@ -38,7 +39,6 @@ class Video extends Component {
38
39
  employeeNumber: '',
39
40
  employeeName: '',
40
41
  isModalVisibleInvitation: false,
41
- isPDF: false,
42
42
  roomCustomerList: [],
43
43
  facialImg: '',
44
44
  isModalVisibleFacial: false,
@@ -61,13 +61,10 @@ class Video extends Component {
61
61
  workSpaceId: '',
62
62
  bizName: '',
63
63
  appId: '',
64
- // room_server_url: 'wss://cn-hangzhou-mrtc.cloud.alipay.com/ws',
65
- room_server_url: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
66
64
  channelId: this.props.roomId,
67
65
  rtoken: this.props.mtoken,
68
66
  sessionId: this.props.sessionId,
69
67
  imRoomId: this.props.imRoomId,
70
- html_string: '<span style="color:red">123456</span>',
71
68
  };
72
69
  // eslint-disable-next-line no-undef
73
70
  test_controller = '';
@@ -128,7 +125,7 @@ class Video extends Component {
128
125
  config_param.biz_name = this.state.bizName; // 'demo'
129
126
  config_param.appId = this.state.appId;
130
127
 
131
- config_param.room_server_url = this.state.room_server_url;
128
+ config_param.room_server_url = this.props.roomServerUrl;
132
129
  // 允许最大断网时间 (超过未重连, 直接关闭)
133
130
  config_param.network_check_timeout = 10000;
134
131
  this.test_controller.Connect(config_param)
@@ -1087,34 +1084,37 @@ class Video extends Component {
1087
1084
  this.setState({
1088
1085
  loading: true,
1089
1086
  })
1087
+ console.log( this.props.resourcePath + "/log4b.js")
1090
1088
  const _dependScripts = [
1091
- "https://counter-web.leimondata.cn:7199/log4b.js",
1092
- "https://counter-web.leimondata.cn:7199/meeting_api_util.js",
1093
- "https://counter-web.leimondata.cn:7199/mcu.js",
1094
- "https://counter-web.leimondata.cn:7199/client_record.js",
1095
- "https://counter-web.leimondata.cn:7199/meeting_vod.js",
1096
- "https://counter-web.leimondata.cn:7199/remote_record.js",
1097
- "https://counter-web.leimondata.cn:7199/meeting_invite.js",
1098
- "https://counter-web.leimondata.cn:7199/meeting_im.js",
1099
- "https://counter-web.leimondata.cn:7199/meeting_camera_stream.js",
1100
- "https://counter-web.leimondata.cn:7199/meeting_file_stream.js",
1101
- "https://counter-web.leimondata.cn:7199/meeting_desk_stream.js",
1102
- "https://counter-web.leimondata.cn:7199/meeting_html_stream.js",
1103
- "https://counter-web.leimondata.cn:7199/meeting_beautify_stream.js",
1104
- "https://counter-web.leimondata.cn:7199/stream.js",
1105
- "https://counter-web.leimondata.cn:7199/room.js",
1106
- "https://counter-web.leimondata.cn:7199/backgroundBlur.js",
1107
- "https://counter-web.leimondata.cn:7199/meeting_api.js",
1108
- "https://counter-web.leimondata.cn:7199/html2image.js",
1109
- "https://counter-web.leimondata.cn:7199/reconnecting-websocket.min.js",
1110
- "https://counter-web.leimondata.cn:7199/mtc_api.js",
1111
- "https://counter-web.leimondata.cn:7199/BandwidthHandler.js",
1112
- "https://gw.alipayobjects.com/os/lib/recordrtc/5.5.9/RecordRTC.min.js",
1113
- "https://counter-web.leimondata.cn:7199/pdf.js",
1114
- "https://counter-web.leimondata.cn:7199/EBML.js",
1115
- "https://counter-web.leimondata.cn:7199/adapter.js",
1116
- "https://counter-web.leimondata.cn:7199/beauty.js",
1117
- "https://counter-web.leimondata.cn:7199/getMediaInfo.js",
1089
+ // https://counter-web.leimondata.cn:7199
1090
+ this.props.resourcePath + "/log4b.js",
1091
+ this.props.resourcePath + "/meeting_api_util.js",
1092
+ this.props.resourcePath + "/mcu.js",
1093
+ this.props.resourcePath + "/client_record.js",
1094
+ this.props.resourcePath + "/meeting_vod.js",
1095
+ this.props.resourcePath + "/remote_record.js",
1096
+ this.props.resourcePath + "/meeting_invite.js",
1097
+ this.props.resourcePath + "/meeting_im.js",
1098
+ this.props.resourcePath + "/meeting_camera_stream.js",
1099
+ this.props.resourcePath + "/meeting_file_stream.js",
1100
+ this.props.resourcePath + "/meeting_desk_stream.js",
1101
+ this.props.resourcePath + "/meeting_html_stream.js",
1102
+ this.props.resourcePath + "/meeting_beautify_stream.js",
1103
+ this.props.resourcePath + "/stream.js",
1104
+ this.props.resourcePath + "/room.js",
1105
+ this.props.resourcePath + "/backgroundBlur.js",
1106
+ this.props.resourcePath + "/meeting_api.js",
1107
+ this.props.resourcePath + "/html2image.js",
1108
+ this.props.resourcePath + "/reconnecting-websocket.min.js",
1109
+ this.props.resourcePath + "/mtc_api.js",
1110
+ this.props.resourcePath + "/BandwidthHandler.js",
1111
+ this.props.resourcePath + "/RecordRTC.min.js",
1112
+ // "https://gw.alipayobjects.com/os/lib/recordrtc/5.5.9/RecordRTC.min.js",
1113
+ this.props.resourcePath + "/pdf.js",
1114
+ this.props.resourcePath + "/EBML.js",
1115
+ this.props.resourcePath + "/adapter.js",
1116
+ this.props.resourcePath + "/beauty.js",
1117
+ this.props.resourcePath + "/getMediaInfo.js",
1118
1118
  ]
1119
1119
  const that = this
1120
1120
  let i = 0
@@ -1541,8 +1541,13 @@ class Video extends Component {
1541
1541
  file: this.signCanvas.current.canvas.drawing.toDataURL('image/png')
1542
1542
  })
1543
1543
  }
1544
+ switchExternal=()=>{
1545
+ this.setState({
1546
+ isPDF: true
1547
+ })
1548
+ }
1544
1549
  render() {
1545
-
1550
+ const pdfChildren = React.cloneElement(this.props.children,{width: 100, height: 100, id: 12})
1546
1551
  return (
1547
1552
 
1548
1553
  <div className="all">
@@ -1616,8 +1621,8 @@ class Video extends Component {
1616
1621
 
1617
1622
  </div>
1618
1623
  <div className={`itemed ${this.state.isBigVideo == 'video2' ? 'item1' : ""}`}>
1619
- {
1620
- !this.state.isPDF ? <div onClick={this.enlargeClick.bind(this, 'isLangVideo2')}>
1624
+
1625
+ <div onClick={this.enlargeClick.bind(this, 'isLangVideo2')}>
1621
1626
  <video
1622
1627
  id="video2"
1623
1628
  autoPlay
@@ -1628,12 +1633,6 @@ class Video extends Component {
1628
1633
  <label style={{ display: 'none' }} id="feedId2" type="text" />
1629
1634
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView2" width="70" height="70"></canvas>
1630
1635
  </div>
1631
- :
1632
- <div className="video" id="touBoxItem">
1633
- </div>
1634
- }
1635
-
1636
-
1637
1636
  </div>
1638
1637
  <div className={`itemed ${this.state.isBigVideo == 'video3' ? 'item1' : ""}`}
1639
1638
  onClick={this.enlargeClick.bind(this, 'isLangVideo3')}>
@@ -1671,18 +1670,23 @@ class Video extends Component {
1671
1670
  <label style={{ display: 'none' }} id="feedId5" type="text" />
1672
1671
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView5" width="70" height="70"></canvas>
1673
1672
  </div>
1674
- <div className={`itemed ${this.state.isBigVideo == 'video6' ? 'item1' : ""}`}
1675
- onClick={this.enlargeClick.bind(this, 'isLangVideo6')}>
1676
- <video
1677
- id="video6"
1678
- autoPlay
1679
- muted={true}
1680
- className="video"
1681
- />
1682
- <audio id="audio6" autoPlay />
1683
- <label style={{ display: 'none' }} id="feedId6" type="text" />
1684
- <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView6" width="70" height="70"></canvas>
1685
- </div>
1673
+ <div onClick={this.enlargeClick.bind(this, 'isLangVideo6')} className={`${this.state.isBigVideo == 'video6' ? (this.state.isPDF ? 'item1' : 'item1 itemed') : "itemed"}`}>
1674
+ <div style={{ display: (this.state.isPDF) ? '' : 'none', }} id="touBoxItem">
1675
+ <pdfChildren></pdfChildren>
1676
+ </div>
1677
+ <div style={this.state.isPDF ? {display: 'none'}: {}}>
1678
+ <video
1679
+ id="video6"
1680
+ autoPlay
1681
+ muted={true}
1682
+ className="video"
1683
+ />
1684
+ <audio id="audio6" autoPlay/>
1685
+ <label style={{display: 'none'}} id="feedId6" type="text"/>
1686
+ <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView6" width="70" height="70"></canvas>
1687
+ </div>
1688
+
1689
+ </div>
1686
1690
  </div>
1687
1691
 
1688
1692
  </div>
@@ -1703,6 +1707,7 @@ class Video extends Component {
1703
1707
  invitationClick={this.invitationClick}
1704
1708
  customerFaceClick={this.customerFaceClick}
1705
1709
  ocrClick={this.ocrClick}
1710
+ switchExternal={this.switchExternal}
1706
1711
  ></Foot>
1707
1712
  <Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
1708
1713
  onCancel={this.handleCancel}>
@@ -1769,6 +1774,7 @@ Video.defaultProps = {
1769
1774
  tellerAccount: 't001',
1770
1775
  businessNumber: '123',
1771
1776
  callbackUrl: 'http://47.102.126.132:8720/hsbc/callback',
1772
-
1777
+ roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
1778
+ resourcePath:'https://counter-web.leimondata.cn:7199',
1773
1779
  }
1774
1780
  export default Video