react_hsbc_teller 0.8.1 → 0.8.2

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.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -3,6 +3,7 @@ import JKL from './JKL';
3
3
 
4
4
  let websock;
5
5
  let id;
6
+ let fromHostName;
6
7
  const xmlLang = 'zh';
7
8
  const version = '1.0';
8
9
  let islogin = false;
@@ -84,7 +85,8 @@ function websocketonmessage(e) {
84
85
  } else if (undefined != jsondata.open) {
85
86
  // 记录id
86
87
  id = jsondata.open['-id'];
87
- console.log(id);
88
+ fromHostName = jsondata.open["-from"];
89
+ console.log('记录id',id,fromHostName);
88
90
  } else if (undefined != jsondata['stream:features']) {
89
91
  if (undefined != jsondata['stream:features'].mechanisms) {
90
92
  // 获取登录验证方式
@@ -159,7 +161,7 @@ function newopen() {
159
161
  '-xmlns': 'jabber:client',
160
162
  '-to': JSON.parse(window.sessionStorage.getItem('sigData')).hostname,
161
163
  '-version': version,
162
- '-from': `${JSON.parse(window.sessionStorage.getItem('sigData')).account}@${JSON.parse(window.sessionStorage.getItem('sigData')).hostname}`,
164
+ '-from': `${JSON.parse(window.sessionStorage.getItem('sigData')).account}@${fromHostName}`,
163
165
  '-id': id,
164
166
  '-xml:lang': xmlLang,
165
167
  },
@@ -184,7 +186,7 @@ function bind() {
184
186
  function auth(val) {
185
187
  // Base64编码
186
188
  console.log('www');
187
- const token = window.btoa(`${JSON.parse(window.sessionStorage.getItem('sigData')).account}@${JSON.parse(window.sessionStorage.getItem('sigData')).hostname}\0` + `${JSON.parse(window.sessionStorage.getItem('sigData')).openfireToken}`);
189
+ const token = window.btoa(`${JSON.parse(window.sessionStorage.getItem('sigData')).account}@${fromHostName}\0` + `${JSON.parse(window.sessionStorage.getItem('sigData')).openfireToken}`);
188
190
  const message = {
189
191
  auth: {
190
192
  '-xmlns': 'urn:ietf:params:xml:ns:xmpp-sasl',
@@ -46,7 +46,7 @@ class Main extends Component {
46
46
  Main.defaultProps = {
47
47
  lang: 'zh',
48
48
  // baseURL: 'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
49
- baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
49
+ baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api/',
50
50
 
51
51
  }
52
52
  export default Main