react_hsbc_teller 1.1.8 → 1.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
package/packages/api/api.js
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
import Server from './server';
|
|
2
2
|
|
|
3
3
|
class API extends Server{
|
|
4
|
-
|
|
4
|
+
async ocrCallback(params = {}){
|
|
5
|
+
// return this.axios('get', '/lang/select/2', params);
|
|
6
|
+
try{
|
|
7
|
+
let result = await this.axios('post', '/hsbc/identify/ocr/callback', params);
|
|
8
|
+
console.log(result)
|
|
9
|
+
if(result && (result.data instanceof Object) && result.code === 200){
|
|
10
|
+
return result||[];
|
|
11
|
+
}else{
|
|
12
|
+
let err = {
|
|
13
|
+
tip: '服务异常',
|
|
14
|
+
response: result,
|
|
15
|
+
data: params,
|
|
16
|
+
// url: 'https://api.cangdu.org/shopro/data/products',
|
|
17
|
+
}
|
|
18
|
+
throw err;
|
|
19
|
+
}
|
|
20
|
+
}catch(err){
|
|
21
|
+
throw err;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
5
24
|
async enterRoom(params = {}){
|
|
6
25
|
// return this.axios('get', '/lang/select/2', params);
|
|
7
26
|
try{
|
|
@@ -54,17 +54,17 @@ function websocketonerror() { // 连接建立失败重连
|
|
|
54
54
|
// initWebSocket()
|
|
55
55
|
}
|
|
56
56
|
function websocketonmessage(e) {
|
|
57
|
-
console.log('收到消息', e);
|
|
58
|
-
console.log('收到消息', e.data);
|
|
57
|
+
// console.log('收到消息', e);
|
|
58
|
+
// console.log('收到消息', e.data);
|
|
59
59
|
const jsondata = xml2json(e.data);
|
|
60
60
|
console.log('jsondata', jsondata);
|
|
61
61
|
if (undefined != jsondata.message) {
|
|
62
62
|
if (undefined != jsondata.message.body) {
|
|
63
|
-
console.log('收到的消息:', jsondata.message.body);
|
|
63
|
+
// console.log('收到的消息:', jsondata.message.body);
|
|
64
64
|
const from = jsondata.message['-from'];
|
|
65
|
-
console.log('from', from);
|
|
65
|
+
// console.log('from', from);
|
|
66
66
|
const type = jsondata.message['-type'];
|
|
67
|
-
console.log('type', type);
|
|
67
|
+
// console.log('type', type);
|
|
68
68
|
if ((from.split('/').length > 0) && (from.split('/')[from.split('/').length - 1] == JSON.parse(window.sessionStorage.getItem('sigData')).account)) {
|
|
69
69
|
// 自己的消息不做处理
|
|
70
70
|
} else if ((type == 'chat' || type == 'groupchat') && jsondata.message.body.length > 0) {
|
|
@@ -217,7 +217,7 @@ function websocketclose(e) { // 关闭
|
|
|
217
217
|
// 发消息
|
|
218
218
|
// // 发送消息 to---接收者id,from---发送者id,type---消息类型(chat--单聊,groupchat--群聊)。message--发送的消息
|
|
219
219
|
function sendMessage(to, from, type, message) {
|
|
220
|
-
console.log('发送聊天信息', to, from, type, message);
|
|
220
|
+
// console.log('发送聊天信息', to, from, type, message);
|
|
221
221
|
if (islogin) {
|
|
222
222
|
const temp = {
|
|
223
223
|
message: {
|
|
@@ -47,9 +47,6 @@ export default class foot extends Component {
|
|
|
47
47
|
inspection = ()=>{
|
|
48
48
|
this.props.inspection()
|
|
49
49
|
}
|
|
50
|
-
screenSwitching =()=>{
|
|
51
|
-
this.props.screenSwitching()
|
|
52
|
-
}
|
|
53
50
|
switchExternal=()=>{
|
|
54
51
|
this.props.switchExternal()
|
|
55
52
|
}
|
|
@@ -164,14 +161,6 @@ export default class foot extends Component {
|
|
|
164
161
|
</div>
|
|
165
162
|
</div>
|
|
166
163
|
</div>
|
|
167
|
-
{/* <div className='footHover' onClick={this.screenSwitching.bind(this)}>
|
|
168
|
-
<div className="one">
|
|
169
|
-
<img className="imgClass" src={require("../../assets/img/inspection.png").default} alt="" />
|
|
170
|
-
<div className="text">
|
|
171
|
-
切换投屏
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
</div> */}
|
|
175
164
|
</div>
|
|
176
165
|
{defaultList}
|
|
177
166
|
|