react_hsbc_teller 0.7.0 → 0.7.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/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/common/websocket.js +3 -10
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@ import JKL from './JKL';
|
|
|
3
3
|
|
|
4
4
|
let websock;
|
|
5
5
|
let id;
|
|
6
|
-
let fromHostName;
|
|
7
6
|
const xmlLang = 'zh';
|
|
8
7
|
const version = '1.0';
|
|
9
8
|
let islogin = false;
|
|
@@ -37,9 +36,6 @@ function websocketonopen() { // 连接建立之后执行send方法发送数据
|
|
|
37
36
|
// 发送建立流请求
|
|
38
37
|
const steam = {
|
|
39
38
|
open: {
|
|
40
|
-
// '-to': 'im.uat.dsp.hsbcfts.com.cn',
|
|
41
|
-
// '-from': `${'web'}@${'im.uat.dsp.hsbcfts.com.cn'}`,
|
|
42
|
-
|
|
43
39
|
'-to': JSON.parse(window.sessionStorage.getItem('sigData')).hostname,
|
|
44
40
|
'-from': `${JSON.parse(window.sessionStorage.getItem('sigData')).account}@${JSON.parse(window.sessionStorage.getItem('sigData')).hostname}`,
|
|
45
41
|
'-xmlns': 'urn:ietf:params:xml:ns:xmpp-framing',
|
|
@@ -88,8 +84,7 @@ function websocketonmessage(e) {
|
|
|
88
84
|
} else if (undefined != jsondata.open) {
|
|
89
85
|
// 记录id
|
|
90
86
|
id = jsondata.open['-id'];
|
|
91
|
-
|
|
92
|
-
console.log('记录id',id,fromHostName);
|
|
87
|
+
console.log(id);
|
|
93
88
|
} else if (undefined != jsondata['stream:features']) {
|
|
94
89
|
if (undefined != jsondata['stream:features'].mechanisms) {
|
|
95
90
|
// 获取登录验证方式
|
|
@@ -164,7 +159,7 @@ function newopen() {
|
|
|
164
159
|
'-xmlns': 'jabber:client',
|
|
165
160
|
'-to': JSON.parse(window.sessionStorage.getItem('sigData')).hostname,
|
|
166
161
|
'-version': version,
|
|
167
|
-
'-from': JSON.parse(window.sessionStorage.getItem('sigData')).account
|
|
162
|
+
'-from': `${JSON.parse(window.sessionStorage.getItem('sigData')).account}@${JSON.parse(window.sessionStorage.getItem('sigData')).hostname}`,
|
|
168
163
|
'-id': id,
|
|
169
164
|
'-xml:lang': xmlLang,
|
|
170
165
|
},
|
|
@@ -189,9 +184,7 @@ function bind() {
|
|
|
189
184
|
function auth(val) {
|
|
190
185
|
// Base64编码
|
|
191
186
|
console.log('www');
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
const token = window.btoa(JSON.parse(window.sessionStorage.getItem('sigData')).account + '@' + fromHostName + '\0' + JSON.parse(window.sessionStorage.getItem('sigData')).openfireToken);
|
|
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}`);
|
|
195
188
|
const message = {
|
|
196
189
|
auth: {
|
|
197
190
|
'-xmlns': 'urn:ietf:params:xml:ns:xmpp-sasl',
|