react_hsbc_teller 0.5.9 → 0.6.0

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.5.9",
3
+ "version": "0.6.0",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -1,8 +1,9 @@
1
1
  .foot{
2
2
  background: #fff;
3
- height: 58px;
3
+ height: 48px;
4
4
  display: inline-flex;
5
5
  width: 100%;
6
+ margin: 10px 0;
6
7
  // position: absolute;
7
8
  // bottom: 0;
8
9
  // left: 0;
@@ -145,6 +145,7 @@ class Video extends Component {
145
145
  this.props.createRoomCallback({
146
146
  type: 1,
147
147
  errorManage: '',
148
+ errorCode: 0,
148
149
  data: {
149
150
  mtoken: this.state.rtoken,
150
151
  imRoomId: result.imRoomId,
@@ -157,6 +158,7 @@ class Video extends Component {
157
158
  this.props.createRoomCallback({
158
159
  type: 2,
159
160
  errorManage: '保存房间信息失败',
161
+ errorCode:-9,
160
162
  data: {}
161
163
  })
162
164
  }
@@ -182,7 +184,7 @@ class Video extends Component {
182
184
  }
183
185
  } catch (err) {
184
186
  console.error(err);
185
- this.roomCallBack(2, '签名失败')
187
+ this.roomCallBack(2, '签名失败',-8)
186
188
  }
187
189
  };
188
190
  handleEdit = () => {
@@ -752,17 +754,19 @@ class Video extends Component {
752
754
  });
753
755
  }
754
756
  };
755
- roomCallBack = (type, manege) => {
757
+ roomCallBack = (type, manege,code) => {
756
758
  if (this.state.sessionId) {
757
759
  this.props.joinRoomCallback({
758
760
  type: type,
759
761
  errorManage: manege,
762
+ errorCode: code,
760
763
  data: {}
761
764
  })
762
765
  } else {
763
766
  this.props.createRoomCallback({
764
767
  type: type,
765
768
  errorManage: manege,
769
+ errorCode: code,
766
770
  data: {}
767
771
  })
768
772
  }
@@ -806,11 +810,13 @@ class Video extends Component {
806
810
  this.test_controller.StopRemoteRecord(this.state.recordId)
807
811
  }
808
812
  }
809
- } else if (Mival.typeId == 1010) {
810
- if (Mival.sessionId == this.state.sessionId) {
811
- this.endSession('customerHangUp')
812
- }
813
- } else if (Mival.typeId == 1215) {
813
+ }
814
+ // else if (Mival.typeId == 1010) {
815
+ // if (Mival.sessionId == this.state.sessionId) {
816
+ // this.endSession('customerHangUp')
817
+ // }
818
+ // }
819
+ else if (Mival.typeId == 1215) {
814
820
  // 一炒多的图片
815
821
  if (Mival.sessionId == this.state.sessionId) {
816
822
  this.props.imgCallback(Mival.data.type, Mival.data.file) // 文字抄录和风险抄录,3--风险,,2--文字
@@ -1018,7 +1024,7 @@ class Video extends Component {
1018
1024
  window.IMOpenfire = msg =>{
1019
1025
  console.log('im登录', msg)
1020
1026
  if(!msg) {
1021
- this.roomCallBack(2, 'im建立连接失败')
1027
+ this.roomCallBack(2, 'im建立连接失败',-7)
1022
1028
  } else {
1023
1029
  this.setState({
1024
1030
  imStatus: msg
@@ -1112,7 +1118,7 @@ class Video extends Component {
1112
1118
  this.test_controller.OnGetDevicesFailed = (code, msg) => {
1113
1119
  console.log('获取设备失败', code, msg)
1114
1120
  this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头','error')
1115
- this.roomCallBack(2, '获取失败')
1121
+ this.roomCallBack(2, '获取设备失败',-1)
1116
1122
  };
1117
1123
  // 建立连接成功
1118
1124
  this.test_controller.OnConnectOK = () => {
@@ -1121,7 +1127,7 @@ class Video extends Component {
1121
1127
  };
1122
1128
  this.test_controller.OnConnectFailed = (code, msg) => {
1123
1129
  console.log('建立连接失败', code, msg)
1124
- this.roomCallBack(2, '连接失败')
1130
+ this.roomCallBack(2, '连接失败',-2)
1125
1131
  };
1126
1132
  // 断开连接回调
1127
1133
  this.test_controller.OnConnectClose = (code, msg) => {
@@ -1135,7 +1141,7 @@ class Video extends Component {
1135
1141
  // 初始化房间失败
1136
1142
  this.test_controller.OnInitRoomConfigFail = (err_code, err_msg) => {
1137
1143
  console.log('初始化房间失败', err_code, err_msg)
1138
- this.roomCallBack(2, '初始化失败')
1144
+ this.roomCallBack(2, '初始化失败',-3)
1139
1145
  };
1140
1146
  // 初始化成功回调
1141
1147
  this.test_controller.OnInitRoomConfigOK = () => {
@@ -1161,7 +1167,7 @@ class Video extends Component {
1161
1167
  // 创建房间失败
1162
1168
  this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
1163
1169
  console.log('创建房间失败', err_code, err_msg)
1164
- this.roomCallBack(2, '创建失败')
1170
+ this.roomCallBack(2, '创建房间失败',-4)
1165
1171
  };
1166
1172
  // 初始化⾳视频成功
1167
1173
  this.test_controller.OnMediaCallSucc = (sid) => {
@@ -1178,12 +1184,12 @@ class Video extends Component {
1178
1184
  // 加入房间成功
1179
1185
  this.test_controller.OnJoinRoomSucc = () => {
1180
1186
  console.log('加入房间成功')
1181
- this.roomCallBack(1, '')
1187
+ this.roomCallBack(1, '',0)
1182
1188
  };
1183
1189
  // 加入房间失败
1184
1190
  this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
1185
1191
  console.log('加入房间失败', err_code, err_msg)
1186
- this.roomCallBack(2, '加入失败')
1192
+ this.roomCallBack(2, '加入失败',-5)
1187
1193
  };
1188
1194
  // 发布媒体流成功
1189
1195
  this.test_controller.OnPublishSucc = (sid) => {
@@ -1203,6 +1209,7 @@ class Video extends Component {
1203
1209
  // 发布媒体流失败
1204
1210
  this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
1205
1211
  console.log('发布媒体流失败', sid, err_code, err_msg)
1212
+ this.roomCallBack(2, '发布失败',-6)
1206
1213
  };
1207
1214
  // 订阅媒体流成功
1208
1215
  this.test_controller.OnSubscribeSucc = (feed, sid) => {
@@ -2094,7 +2101,7 @@ class Video extends Component {
2094
2101
  axios.get(this.props.resourcePath + "/beauty/beauty.js")
2095
2102
  .then(response => this.addToScriptClick()).catch(function (error) {
2096
2103
  console.log(error);
2097
- this.roomCallBack(2, '创建房间失败')
2104
+ this.roomCallBack(2, '创建房间失败',-4)
2098
2105
 
2099
2106
  })
2100
2107
 
@@ -2869,14 +2876,22 @@ class Video extends Component {
2869
2876
  width:'100%',
2870
2877
  height:'100%',
2871
2878
  position: 'absolute',
2872
- left: 0
2879
+ left: 0,
2880
+ top: 0,
2881
+ right: 0,
2882
+ bottom: 0,
2883
+ margin: 'auto'
2873
2884
 
2874
2885
  } :{
2875
2886
  'z-index': '0',
2876
2887
  width:'100%',
2877
- height:'100%',
2888
+ // height:'100%',
2878
2889
  position: 'absolute',
2879
- left: 0
2890
+ left: 0,
2891
+ top: 0,
2892
+ right: 0,
2893
+ bottom: 0,
2894
+ margin: 'auto'
2880
2895
  };
2881
2896
  return (
2882
2897
  <div className="all">
@@ -216,8 +216,13 @@
216
216
  }
217
217
  .themeClass{
218
218
  position: absolute;
219
- top: 50%;
220
- left: 40%;
219
+ top: 0;
220
+ left: 0;
221
+ right: 0;
222
+ bottom: 0;
223
+ margin: auto;
224
+ width: 500px;
225
+ height: 150px;
221
226
  font-size: 22px;
222
227
  color: #222222;
223
228
  font-weight: 600;
@@ -225,6 +230,7 @@
225
230
  li{
226
231
  list-style: none;
227
232
  margin: 21px 0;
233
+ text-align: left;
228
234
  span{
229
235
  font-size: 20px;
230
236
  width: 143px;