react_hsbc_teller 0.1.9 → 0.2.3

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.1.9",
3
+ "version": "0.2.3",
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 = (
@@ -81,6 +84,12 @@ export default class foot extends Component {
81
84
  </div>
82
85
  </div>
83
86
  <div className="total totalTwo">
87
+ <div className="one" onClick={this.switchExternal.bind(this)}>
88
+ <img src={require("../../assets/img/huazhonghua.png").default} alt="" />
89
+ <div className="text">
90
+ 切换到RM白板
91
+ </div>
92
+ </div>
84
93
  {
85
94
  isTranscribing &&
86
95
  <div className="one" onClick={this.transcribingClick.bind(this)}>
@@ -132,6 +141,7 @@ export default class foot extends Component {
132
141
  画中画
133
142
  </div>
134
143
  </div>
144
+
135
145
  </div>
136
146
  <div className="total totalThree">
137
147
  <button className="buttonClass" onClick={this.endSession.bind(this)}>
@@ -34,6 +34,7 @@ line-height: 11px;
34
34
  justify-content: center;
35
35
  }
36
36
  .totalThree{
37
+ margin-top: 10px;
37
38
  justify-content: flex-end;
38
39
  }
39
40
  .buttonClass{
@@ -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,22 @@ class Video extends Component {
1541
1541
  file: this.signCanvas.current.canvas.drawing.toDataURL('image/png')
1542
1542
  })
1543
1543
  }
1544
+ switchExternal=()=>{
1545
+ if(this.state.isPDF){
1546
+ this.setState({
1547
+ isPDF: false,
1548
+ isBigVideo: 'video1'
1549
+ })
1550
+ } else{
1551
+ this.setState({
1552
+ isPDF: true,
1553
+ isBigVideo: 'video6'
1554
+ })
1555
+ }
1556
+
1557
+ }
1544
1558
  render() {
1545
-
1559
+ const pdfChildren = React.cloneElement(this.props.children,{width: 100, height: 100, id: 12})
1546
1560
  return (
1547
1561
 
1548
1562
  <div className="all">
@@ -1616,8 +1630,8 @@ class Video extends Component {
1616
1630
 
1617
1631
  </div>
1618
1632
  <div className={`itemed ${this.state.isBigVideo == 'video2' ? 'item1' : ""}`}>
1619
- {
1620
- !this.state.isPDF ? <div onClick={this.enlargeClick.bind(this, 'isLangVideo2')}>
1633
+
1634
+ <div onClick={this.enlargeClick.bind(this, 'isLangVideo2')}>
1621
1635
  <video
1622
1636
  id="video2"
1623
1637
  autoPlay
@@ -1628,12 +1642,6 @@ class Video extends Component {
1628
1642
  <label style={{ display: 'none' }} id="feedId2" type="text" />
1629
1643
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView2" width="70" height="70"></canvas>
1630
1644
  </div>
1631
- :
1632
- <div className="video" id="touBoxItem">
1633
- </div>
1634
- }
1635
-
1636
-
1637
1645
  </div>
1638
1646
  <div className={`itemed ${this.state.isBigVideo == 'video3' ? 'item1' : ""}`}
1639
1647
  onClick={this.enlargeClick.bind(this, 'isLangVideo3')}>
@@ -1671,18 +1679,23 @@ class Video extends Component {
1671
1679
  <label style={{ display: 'none' }} id="feedId5" type="text" />
1672
1680
  <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView5" width="70" height="70"></canvas>
1673
1681
  </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>
1682
+ <div onClick={this.enlargeClick.bind(this, 'isLangVideo6')} className={`${this.state.isBigVideo == 'video6' ? (this.state.isPDF ? 'item1' : 'item1 itemed') : "itemed"}`}>
1683
+ <div style={{ display: (this.state.isPDF) ? '' : 'none', }} id="touBoxItem">
1684
+ {pdfChildren}
1685
+ </div>
1686
+ <div style={this.state.isPDF ? {display: 'none'}: {}}>
1687
+ <video
1688
+ id="video6"
1689
+ autoPlay
1690
+ muted={true}
1691
+ className="video"
1692
+ />
1693
+ <audio id="audio6" autoPlay/>
1694
+ <label style={{display: 'none'}} id="feedId6" type="text"/>
1695
+ <canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView6" width="70" height="70"></canvas>
1696
+ </div>
1697
+
1698
+ </div>
1686
1699
  </div>
1687
1700
 
1688
1701
  </div>
@@ -1703,6 +1716,7 @@ class Video extends Component {
1703
1716
  invitationClick={this.invitationClick}
1704
1717
  customerFaceClick={this.customerFaceClick}
1705
1718
  ocrClick={this.ocrClick}
1719
+ switchExternal={this.switchExternal}
1706
1720
  ></Foot>
1707
1721
  <Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
1708
1722
  onCancel={this.handleCancel}>
@@ -1769,6 +1783,7 @@ Video.defaultProps = {
1769
1783
  tellerAccount: 't001',
1770
1784
  businessNumber: '123',
1771
1785
  callbackUrl: 'http://47.102.126.132:8720/hsbc/callback',
1772
-
1786
+ roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
1787
+ resourcePath:'https://counter-web.leimondata.cn:7199',
1773
1788
  }
1774
1789
  export default Video
@@ -77,7 +77,7 @@
77
77
  }
78
78
  .health{
79
79
  margin: 20px;
80
- height: calc(100vh - 5px);
80
+ height: ~"calc(100vh - 60px)";
81
81
  }
82
82
  .all{
83
83
  height: 100%;
@@ -129,4 +129,7 @@
129
129
  border:1px dashed #DDDDDD;
130
130
  margin: 24px;
131
131
  flex:1;
132
+ }
133
+ .ant-spin-nested-loading,.ant-spin-container{
134
+ height: 100%;
132
135
  }
package/src/index.less CHANGED
@@ -1 +1,6 @@
1
- .hsbc {}
1
+ .hsbc {
2
+ height: calc(100vh);
3
+ }
4
+ .hsbc>div {
5
+ height: 100%;
6
+ }