react_hsbc_teller 1.2.0 → 1.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": "1.2.0",
3
+ "version": "1.2.3",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -2,6 +2,46 @@ import Server from './server';
2
2
 
3
3
  class API extends Server{
4
4
 
5
+ async retrieveCustomerInfoByActivityId(params = {}){
6
+ // return this.axios('get', '/lang/select/2', params);
7
+ try{
8
+ let result = await this.axios('post', '/hsbc/retrieveCustomerInfoByActivityId', params);
9
+ console.log(result)
10
+ if(result && (result.data instanceof Object) && result.code === 200){
11
+ return result||[];
12
+ }else{
13
+ let err = {
14
+ tip: '服务异常',
15
+ response: result,
16
+ data: params,
17
+ // url: 'https://api.cangdu.org/shopro/data/products',
18
+ }
19
+ throw err;
20
+ }
21
+ }catch(err){
22
+ throw err;
23
+ }
24
+ }
25
+ async ocrCallback(params = {}){
26
+ // return this.axios('get', '/lang/select/2', params);
27
+ try{
28
+ let result = await this.axios('post', '/hsbc/identify/ocr/callback', params);
29
+ console.log(result)
30
+ if(result && (result.data instanceof Object) && result.code === 200){
31
+ return result||[];
32
+ }else{
33
+ let err = {
34
+ tip: '服务异常',
35
+ response: result,
36
+ data: params,
37
+ // url: 'https://api.cangdu.org/shopro/data/products',
38
+ }
39
+ throw err;
40
+ }
41
+ }catch(err){
42
+ throw err;
43
+ }
44
+ }
5
45
  async enterRoom(params = {}){
6
46
  // return this.axios('get', '/lang/select/2', params);
7
47
  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: {
@@ -53,11 +53,11 @@ export default class foot extends Component {
53
53
  render() {
54
54
  const {clickedOcr,clickedFacial,img,isWhiteboard,cameraImg,isTranscribing ,screenName,suspendName,customerList,menus,voiceName} = this.props
55
55
  const content = (
56
- <div>
56
+ <div style={{display: 'inline-grid'}}>
57
57
  {customerList.map((item,index)=>{
58
58
  return <div key={index}className="customer" onClick={this.customerFaceClick.bind(this,item)}>
59
- <img className="imgClass" alt="" src={require("../../assets/img/youke.png").default} />
60
- <li className="listLi" key={item.customerId}>{item.name}</li>
59
+ <img className="imgClassFoot" alt="" src={require("../../assets/img/youke.png").default} />
60
+ <span className="listLi" key={item.customerId}>{item.name}</span>
61
61
  </div>
62
62
  }
63
63
  )
@@ -64,6 +64,10 @@ line-height: 11px;
64
64
  font-size: 16px;
65
65
  color: #FFFFFF;
66
66
  }
67
+ .imgClassFoot{
68
+ width: 25px;
69
+ height: 25px;
70
+ }
67
71
  .imgClass{
68
72
  width: 25px;
69
73
  height: 25px;
@@ -72,5 +76,10 @@ color: #FFFFFF;
72
76
  margin-top: 4px;
73
77
  }
74
78
  .customer{
75
- display: inline-flex
79
+ width: 150px;
80
+ height: 30px;
81
+ }
82
+ .customer:hover{
83
+ background: #F3F3F3;
84
+ border-radius: 8px;
76
85
  }