react_hsbc_teller 2.0.3 → 2.0.4-6.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.
Files changed (46) hide show
  1. package/lib/hsbc.js +1 -1
  2. package/lib/hsbc.js.LICENSE.txt +11 -0
  3. package/package.json +2 -1
  4. package/packages/api/api.js +267 -2
  5. package/packages/assets/img/icon_asr.png +0 -0
  6. package/packages/assets/img/icon_env.png +0 -0
  7. package/packages/assets/img/icon_fail.jpg +0 -0
  8. package/packages/assets/img/icon_paper.png +0 -0
  9. package/packages/assets/img/icon_success.jpg +0 -0
  10. package/packages/assets/mp3/ipad_join_meeting.mp3 +0 -0
  11. package/packages/assets/mp3/ipad_leave_error.mp3 +0 -0
  12. package/packages/assets/mp3/ipad_leave_meeting.mp3 +0 -0
  13. package/packages/assets/mp3/ipad_low_power.mp3 +0 -0
  14. package/packages/assets/mp3/networkweak.mp3 +0 -0
  15. package/packages/assets/mp3/pip_close.mp3 +0 -0
  16. package/packages/assets/mp3/record_error.mp3 +0 -0
  17. package/packages/demo/demo.js +52 -18
  18. package/packages/demo/pdf.js +16 -1
  19. package/packages/pages/foot/foot.jsx +29 -6
  20. package/packages/pages/foot/foot.less +1 -0
  21. package/packages/pages/header/header.jsx +1 -1
  22. package/packages/pages/multiModule/components/copy/agree.jsx +115 -0
  23. package/packages/pages/multiModule/components/copy/agree.less +105 -0
  24. package/packages/pages/multiModule/components/copy/copyTwo.jsx +666 -0
  25. package/packages/pages/multiModule/components/copy/copyTwo.less +180 -0
  26. package/packages/pages/multiModule/components/copy/copy_en.jsx +368 -0
  27. package/packages/pages/multiModule/components/copy/copy_en.less +145 -0
  28. package/packages/pages/multiModule/components/copy/copylist.jsx +291 -0
  29. package/packages/pages/multiModule/components/copy/copylist.less +83 -0
  30. package/packages/pages/multiModule/components/copy/risk.jsx +296 -0
  31. package/packages/pages/multiModule/components/copy/risk.less +123 -0
  32. package/packages/pages/multiModule/components/sign/signMy.jsx +308 -0
  33. package/packages/pages/multiModule/components/sign/signMy.less +128 -0
  34. package/packages/pages/multiModule/components/subscribe/subscribe.jsx +113 -0
  35. package/packages/pages/multiModule/components/subscribe/subscribe.less +82 -0
  36. package/packages/pages/multiModule/multiModule.jsx +26 -0
  37. package/packages/pages/multiModule/multiModule.less +20 -0
  38. package/packages/pages/sign/signMy.jsx +2 -0
  39. package/packages/pages/video/video.jsx +2351 -730
  40. package/packages/pages/video/video.less +92 -2
  41. package/packages/utils/asrController.js +246 -0
  42. package/packages/utils/utils.js +122 -0
  43. package/packages/common/JKL.js +0 -61
  44. package/packages/common/XML.js +0 -271
  45. package/packages/common/websocket.js +0 -267
  46. package/packages/utils/cell.js +0 -64
@@ -1,271 +0,0 @@
1
- /* eslint-disable no-undef */
2
- // ========================================================================
3
- // XML.ObjTree -- XML source code from/to JavaScript object like E4X
4
- // ========================================================================
5
-
6
- import JKL from './JKL';
7
-
8
- const XML = {};
9
-
10
- XML.ObjTree = function () {
11
- return this;
12
- };
13
-
14
- // class variables
15
-
16
- XML.ObjTree.VERSION = '0.23';
17
-
18
- // object prototype
19
-
20
- XML.ObjTree.prototype.xmlDecl = '<?xml version="1.0" encoding="UTF-8" ?>\n';
21
- XML.ObjTree.prototype.attr_prefix = '-';
22
-
23
- // method: parseXML( xmlsource )
24
-
25
- XML.ObjTree.prototype.parseXML = function (xml) {
26
- let xmldom;
27
- let root;
28
- if (window.DOMParser) {
29
- xmldom = new DOMParser();
30
- // xmldom.async = false; // DOMParser is always sync-mode
31
- const dom = xmldom.parseFromString(xml, 'application/xml');
32
- if (!dom) return;
33
- root = dom.documentElement;
34
- } else if (window.ActiveXObject) {
35
- xmldom = new ActiveXObject('Microsoft.XMLDOM');
36
- xmldom.async = false;
37
- xmldom.loadXML(xml);
38
- root = xmldom.documentElement;
39
- }
40
- if (!root) return;
41
- return this.parseDOM(root);
42
- };
43
-
44
- // method: parseHTTP( url, options, callback )
45
-
46
- XML.ObjTree.prototype.parseHTTP = function (url, options, callback) {
47
- const myopt = {};
48
- for (const key in options) {
49
- myopt[key] = options[key]; // copy object
50
- }
51
- if (!myopt.method) {
52
- if (typeof (myopt.postBody) === 'undefined'
53
- && typeof (myopt.postbody) === 'undefined'
54
- && typeof (myopt.parameters) === 'undefined') {
55
- myopt.method = 'get';
56
- } else {
57
- myopt.method = 'post';
58
- }
59
- }
60
- if (callback) {
61
- myopt.asynchronous = true; // async-mode
62
- const __this = this;
63
- const __func = callback;
64
- const __save = myopt.onComplete;
65
- myopt.onComplete = function (trans) {
66
- let tree;
67
- if (trans && trans.responseXML && trans.responseXML.documentElement) {
68
- tree = __this.parseDOM(trans.responseXML.documentElement);
69
- }
70
- __func(tree, trans);
71
- if (__save) __save(trans);
72
- };
73
- } else {
74
- myopt.asynchronous = false; // sync-mode
75
- }
76
- let trans;
77
- if (typeof (HTTP) !== 'undefined' && HTTP.Request) {
78
- myopt.uri = url;
79
- var req = new HTTP.Request(myopt); // JSAN
80
- if (req) trans = req.transport;
81
- } else if (typeof (Ajax) !== 'undefined' && Ajax.Request) {
82
- var req = new Ajax.Request(url, myopt); // ptorotype.js
83
- if (req) trans = req.transport;
84
- }
85
- if (callback) return trans;
86
- if (trans && trans.responseXML && trans.responseXML.documentElement) {
87
- return this.parseDOM(trans.responseXML.documentElement);
88
- }
89
- };
90
-
91
- // method: parseDOM( documentroot )
92
-
93
- XML.ObjTree.prototype.parseDOM = function (root) {
94
- if (!root) return;
95
-
96
- this.__force_array = {};
97
- if (this.force_array) {
98
- for (let i = 0; i < this.force_array.length; i++) {
99
- this.__force_array[this.force_array[i]] = 1;
100
- }
101
- }
102
-
103
- let json = this.parseElement(root); // parse root node
104
- if (this.__force_array[root.nodeName]) {
105
- json = [json];
106
- }
107
- if (root.nodeType != 11) { // DOCUMENT_FRAGMENT_NODE
108
- const tmp = {};
109
- tmp[root.nodeName] = json; // root nodeName
110
- json = tmp;
111
- }
112
- return json;
113
- };
114
-
115
- // method: parseElement( element )
116
-
117
- XML.ObjTree.prototype.parseElement = function (elem) {
118
- // COMMENT_NODE
119
- if (elem.nodeType == 7) {
120
- return;
121
- }
122
-
123
- // TEXT_NODE CDATA_SECTION_NODE
124
- if (elem.nodeType == 3 || elem.nodeType == 4) {
125
- const bool = elem.nodeValue.match(/[^\x00-\x20]/);
126
- if (bool == null) return; // ignore white spaces
127
- return elem.nodeValue;
128
- }
129
-
130
- let retval;
131
- const cnt = {};
132
-
133
- // parse attributes
134
- if (elem.attributes && elem.attributes.length) {
135
- retval = {};
136
- for (var i = 0; i < elem.attributes.length; i++) {
137
- var key = elem.attributes[i].nodeName;
138
- if (typeof (key) !== 'string') continue;
139
- var val = elem.attributes[i].nodeValue;
140
- if (!val) continue;
141
- key = this.attr_prefix + key;
142
- if (typeof (cnt[key]) === 'undefined') cnt[key] = 0;
143
- cnt[key]++;
144
- this.addNode(retval, key, cnt[key], val);
145
- }
146
- }
147
-
148
- // parse child nodes (recursive)
149
- if (elem.childNodes && elem.childNodes.length) {
150
- let textonly = true;
151
- if (retval) textonly = false; // some attributes exists
152
- for (var i = 0; i < elem.childNodes.length && textonly; i++) {
153
- const ntype = elem.childNodes[i].nodeType;
154
- if (ntype == 3 || ntype == 4) continue;
155
- textonly = false;
156
- }
157
- if (textonly) {
158
- if (!retval) retval = '';
159
- for (var i = 0; i < elem.childNodes.length; i++) {
160
- retval += elem.childNodes[i].nodeValue;
161
- }
162
- } else {
163
- if (!retval) retval = {};
164
- for (var i = 0; i < elem.childNodes.length; i++) {
165
- var key = elem.childNodes[i].nodeName;
166
- if (typeof (key) !== 'string') continue;
167
- var val = this.parseElement(elem.childNodes[i]);
168
- if (!val) continue;
169
- if (typeof (cnt[key]) === 'undefined') cnt[key] = 0;
170
- cnt[key]++;
171
- this.addNode(retval, key, cnt[key], val);
172
- }
173
- }
174
- }
175
- return retval;
176
- };
177
-
178
- // method: addNode( hash, key, count, value )
179
-
180
- XML.ObjTree.prototype.addNode = function (hash, key, cnts, val) {
181
- if (this.__force_array[key]) {
182
- if (cnts == 1) hash[key] = [];
183
- hash[key][hash[key].length] = val; // push
184
- } else if (cnts == 1) { // 1st sibling
185
- hash[key] = val;
186
- } else if (cnts == 2) { // 2nd sibling
187
- hash[key] = [hash[key], val];
188
- } else { // 3rd sibling and more
189
- hash[key][hash[key].length] = val;
190
- }
191
- };
192
-
193
- // method: writeXML( tree )
194
-
195
- XML.ObjTree.prototype.writeXML = function (tree) {
196
- const xml = this.hash_to_xml(null, tree);
197
- return this.xmlDecl + xml;
198
- };
199
-
200
- // method: hash_to_xml( tagName, tree )
201
-
202
- XML.ObjTree.prototype.hash_to_xml = function (name, tree) {
203
- const elem = [];
204
- const attr = [];
205
- for (const key in tree) {
206
- if (!tree.hasOwnProperty(key)) continue;
207
- const val = tree[key];
208
- if (key.charAt(0) != this.attr_prefix) {
209
- if (typeof (val) === 'undefined' || val == null) {
210
- elem[elem.length] = `<${key} />`;
211
- } else if (typeof (val) === 'object' && val.constructor == Array) {
212
- elem[elem.length] = this.array_to_xml(key, val);
213
- } else if (typeof (val) === 'object') {
214
- elem[elem.length] = this.hash_to_xml(key, val);
215
- } else {
216
- elem[elem.length] = this.scalar_to_xml(key, val);
217
- }
218
- } else {
219
- attr[attr.length] = ` ${key.substring(1)}="${this.xml_escape(val)}"`;
220
- }
221
- }
222
- const jattr = attr.join('');
223
- let jelem = elem.join('');
224
- if (typeof (name) === 'undefined' || name == null) {
225
- // no tag
226
- } else if (elem.length > 0) {
227
- if (jelem.match(/\n/)) {
228
- jelem = `<${name}${jattr}>\n${jelem}</${name}>\n`;
229
- } else {
230
- jelem = `<${name}${jattr}>${jelem}</${name}>\n`;
231
- }
232
- } else {
233
- jelem = `<${name}${jattr} />\n`;
234
- }
235
- return jelem;
236
- };
237
-
238
- // method: array_to_xml( tagName, array )
239
-
240
- XML.ObjTree.prototype.array_to_xml = function (name, array) {
241
- const out = [];
242
- for (let i = 0; i < array.length; i++) {
243
- const val = array[i];
244
- if (typeof (val) === 'undefined' || val == null) {
245
- out[out.length] = `<${name} />`;
246
- } else if (typeof (val) === 'object' && val.constructor == Array) {
247
- out[out.length] = this.array_to_xml(name, val);
248
- } else if (typeof (val) === 'object') {
249
- out[out.length] = this.hash_to_xml(name, val);
250
- } else {
251
- out[out.length] = this.scalar_to_xml(name, val);
252
- }
253
- }
254
- return out.join('');
255
- };
256
-
257
- // method: scalar_to_xml( tagName, text )
258
-
259
- XML.ObjTree.prototype.scalar_to_xml = function (name, text) {
260
- if (name == '#text') {
261
- return this.xml_escape(text);
262
- }
263
- return `<${name}>${this.xml_escape(text)}</${name}>\n`;
264
- };
265
-
266
- // method: xml_escape( text )
267
-
268
- XML.ObjTree.prototype.xml_escape = function (text) {
269
- return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
270
- };
271
- export default XML;
@@ -1,267 +0,0 @@
1
- import XML from './XML';
2
- import JKL from './JKL';
3
-
4
- let websock;
5
- let id;
6
- let fromHostName;
7
- const xmlLang = 'zh';
8
- const version = '1.0';
9
- let islogin = false;
10
- function initWebSocket(wsuri) {
11
- // eslint-disable-next-line no-undef
12
- websock = new WebSocket(wsuri, 'xmpp');
13
- websock.onmessage = websocketonmessage;
14
- websock.onopen = websocketonopen;
15
- websock.onerror = websocketonerror;
16
- websock.onclose = websocketclose;
17
- }
18
- const connectionState = ['正在连接..', '连接已建立', '正在关闭..', '已经关闭'];
19
- // json转xml
20
- function json2xml(jsonstring) {
21
- const xotree = new XML.ObjTree();
22
- const xml = xotree.writeXML(jsonstring);
23
- return xml;
24
- }
25
- // xml转json
26
- function xml2json(xmlstring) {
27
- // 将xml字符串转为json
28
- const xotree = new XML.ObjTree();
29
- const json = xotree.parseXML(xmlstring);
30
- // 将json对象转为格式化的字符串
31
- const dumper = new JKL.Dumper();
32
- const jsonText = dumper.dump(json);
33
- return JSON.parse(jsonText);
34
- }
35
- function websocketonopen() { // 连接建立之后执行send方法发送数据
36
- console.log('成功');
37
- // 发送建立流请求
38
- const steam = {
39
- open: {
40
- '-to': JSON.parse(window.sessionStorage.getItem('sigData')).hostname,
41
- '-from': `${JSON.parse(window.sessionStorage.getItem('sigData')).account}@${JSON.parse(window.sessionStorage.getItem('sigData')).hostname}`,
42
- '-xmlns': 'urn:ietf:params:xml:ns:xmpp-framing',
43
- '-xml:lang': xmlLang,
44
- '-version': version,
45
- },
46
- };
47
- websocketsend(json2xml(steam));
48
- }
49
- function websocketonerror() { // 连接建立失败重连
50
- window.IMOpenfire({
51
- status: 'error'
52
- });
53
- console.log('失败');
54
- // initWebSocket()
55
- }
56
- function websocketonmessage(e) {
57
- // console.log('收到消息', e);
58
- // console.log('收到消息', e.data);
59
- const jsondata = xml2json(e.data);
60
- console.log('jsondata', jsondata);
61
- if (undefined != jsondata.message) {
62
- if (undefined != jsondata.message.body) {
63
- // console.log('收到的消息:', jsondata.message.body);
64
- const from = jsondata.message['-from'];
65
- // console.log('from', from);
66
- const type = jsondata.message['-type'];
67
- // console.log('type', type);
68
- if ((from.split('/').length > 0) && (from.split('/')[from.split('/').length - 1] == JSON.parse(window.sessionStorage.getItem('sigData')).account)) {
69
- // 自己的消息不做处理
70
- } else if ((type == 'chat' || type == 'groupchat') && jsondata.message.body.length > 0) {
71
- // console.log('message', (jsondata.message.body.indexOf("IMVedio") != -1))
72
- // if (jsondata.message.body.indexOf("IMVedio") != -1) {
73
- // window.VedioEvt(jsondata.message.body)
74
- // } else {
75
- window.IMEvt(jsondata.message.body);
76
- // }
77
- }
78
- } else if (undefined != jsondata.message.composing) {
79
- console.log('对方正在输入');
80
- } else if (undefined != jsondata.message.gone) {
81
- console.log('对方已关闭和您的聊天');
82
- } else if (undefined != jsondata.message.file) {
83
- console.log('收到的文件:', jsondata.message);
84
- } else {
85
-
86
- }
87
- } else if (undefined != jsondata.open) {
88
- // 记录id
89
- id = jsondata.open['-id'];
90
- fromHostName = jsondata.open["-from"];
91
- console.log('记录id',id,fromHostName);
92
- } else if (undefined != jsondata['stream:features']) {
93
- if (undefined != jsondata['stream:features'].mechanisms) {
94
- // 获取登录验证方式
95
- auth(jsondata['stream:features'].mechanisms.mechanism[0]);
96
- } else if (undefined != jsondata['stream:features'].bind) {
97
- bind();
98
- } else {
99
- // Do-nothing
100
- }
101
- } else if (undefined != jsondata.failure) {
102
- islogin = false;
103
- console.log('登录失败,用户名或者密码错误');
104
- window.IMOpenfire({
105
- status: 'error'
106
- });
107
- } else if (undefined != jsondata.success) {
108
- islogin = true;
109
- console.log('登录成功!');
110
- window.IMOpenfire({
111
- status: 'success'
112
- });
113
- // 发起新的流
114
- newopen();
115
- } else if (undefined != jsondata.iq) {
116
- if (undefined != jsondata.iq.bind) {
117
- // 获取session会话
118
- getsession();
119
- } else {
120
- presence();
121
- }
122
- }
123
- }
124
- // 结束状态
125
- function disconnect() {
126
- const temp = {
127
- close: {
128
- '-xmlns': 'urn:ietf:params:xml:ns:xmpp-framing',
129
- },
130
- };
131
- // 转化为xml
132
- websocketsend(json2xml(temp));
133
- }
134
- // 获取session
135
- function getsession() {
136
- // <iq xmlns="jabber:client" id="ak014gz6x7" type="set"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>
137
- const temp = {
138
- iq: {
139
- '-xmlns': 'jabber:client',
140
- '-id': id,
141
- '-type': 'set',
142
- session: {
143
- '-xmlns': 'urn:ietf:params:xml:ns:xmpp-session',
144
- },
145
- },
146
- };
147
- // 转化为xml
148
- websocketsend(json2xml(temp));
149
- }
150
- // 上线
151
- function presence() {
152
- // <presence id="ak014gz6x7"><status>Online</status><priority>1</priority></presence>
153
- const temp = {
154
- presence: {
155
- '-id': id,
156
- status: 'online',
157
- priority: '1',
158
- },
159
- };
160
- // 转化为xml
161
- websocketsend(json2xml(temp));
162
- }
163
- // 发起新的流
164
- function newopen() {
165
- const temp = {
166
- open: {
167
- '-xmlns': 'jabber:client',
168
- '-to': JSON.parse(window.sessionStorage.getItem('sigData')).hostname,
169
- '-version': version,
170
- '-from': `${JSON.parse(window.sessionStorage.getItem('sigData')).account}@${fromHostName}`,
171
- '-id': id,
172
- '-xml:lang': xmlLang,
173
- },
174
- };
175
- // 转化为xml
176
- websocketsend(json2xml(temp));
177
- }
178
- // bind操作
179
- function bind() {
180
- const temp = {
181
- iq: {
182
- '-id': id,
183
- '-type': 'set',
184
- bind: {
185
- '-xmlns': 'urn:ietf:params:xml:ns:xmpp-bind',
186
- resource: 'appClient',
187
- },
188
- },
189
- };
190
- websocketsend(json2xml(temp));
191
- }
192
- function auth(val) {
193
- // Base64编码
194
- console.log('www');
195
- const token = window.btoa(`${JSON.parse(window.sessionStorage.getItem('sigData')).account}@${fromHostName}\0` + `${JSON.parse(window.sessionStorage.getItem('sigData')).openfireToken}`);
196
- const message = {
197
- auth: {
198
- '-xmlns': 'urn:ietf:params:xml:ns:xmpp-sasl',
199
- '-mechanism': val,
200
- '#text': token,
201
- },
202
- };
203
- console.log(`Client: ${message}`);
204
- websocketsend(json2xml(message));
205
- }
206
- function websocketsend(Data) { // 数据发送
207
- console.log('data', Data);
208
- websock.send(Data);
209
- }
210
- function websocketclose(e) { // 关闭
211
- console.log('断开连接', e);
212
- islogin = false;
213
- window.IMOpenfire({
214
- status: 'close'
215
- })
216
- }
217
- // 发消息
218
- // // 发送消息 to---接收者id,from---发送者id,type---消息类型(chat--单聊,groupchat--群聊)。message--发送的消息
219
- function sendMessage(to, from, type, message) {
220
- // console.log('发送聊天信息', to, from, type, message);
221
- if (islogin) {
222
- const temp = {
223
- message: {
224
- '-type': type,
225
- '-from': from,
226
- '-to': to,
227
- subject: '标题',
228
- body: message,
229
- },
230
- };
231
- // 转化为xml
232
- websocketsend(json2xml(temp));
233
- } else {
234
- console.log('请先登录!');
235
- }
236
- }
237
- // 加入群 from---加入群的人的jid,to--群名称
238
- function joinRoom(from, to) {
239
- // 发送<presence>元素,加入房间
240
- console.log('from', from);
241
- console.log('to', to);
242
- if (islogin) {
243
- const temp = {
244
- presence: {
245
- '-from': from,
246
- '-id': id,
247
- '-to': `${to}/${from.substring(0, from.indexOf('@'))}`,
248
- x: {
249
- '-xmlns': 'http://jabber.org/protocol/muc',
250
- },
251
- history: {
252
- 'maxstanzas': '0'
253
- }
254
- },
255
- };
256
- // 转化为xml
257
- websocketsend(json2xml(temp));
258
- } else {
259
- console.log('请先登录!');
260
- }
261
- }
262
- export {
263
- initWebSocket,
264
- sendMessage,
265
- disconnect,
266
- joinRoom
267
- }
@@ -1,64 +0,0 @@
1
- /* eslint-disable eqeqeq */
2
- /* eslint-disable no-undef */
3
- import {sendMessage} from '../common/websocket';
4
- var index = 0
5
- var maxIndex = 10
6
- var callbackRegister = new Map()
7
- function callNimIM(method, json, callback) {
8
- // 回调处理
9
- const fn = function(status, resData) {
10
- // 回调
11
- if (callback) {
12
- // -----------------------//
13
- // 根据第一个字段code来判断调用是否成功,成功取值data中的数据,失败取值message中的数据
14
- // 可以根据需要,在公共层判断,还是逻辑层判断
15
- // -----------------------//
16
- console.log('resData.code---' + resData.code)
17
- if (resData.code !== 0) {
18
- alert('调用失败,message=' + resData.message)
19
- }
20
- callback(resData.code, resData.message, resData.data)
21
- }
22
- }
23
-
24
- const callId = _generateId()
25
-
26
- callbackRegister.set(callId, fn)
27
- if (method == 'sendChatMsg') {
28
- sendMessage(json.customId, (JSON.parse(window.sessionStorage.getItem('sigData')).account + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), 'chat', json.content)
29
- } else if (method == 'sendCustomCmdMsg') {
30
- sendMessage(json.customId, (JSON.parse(window.sessionStorage.getItem('sigData')).account + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), 'groupchat', json.content)
31
- } else if (method == 'transfer' || method == 'transferreject' || method == 'transferagree') {
32
- // 发起转接或者邀请
33
- json.event = 'IMVedio'
34
- if (method == 'transfer') {
35
- json.command = 'transfer'
36
- } else if (method == 'transferagree') {
37
- json.command = 'transfer_agree'
38
- } else if (method == 'transferreject') {
39
- json.command = 'transfer_reject'
40
- }
41
- console.log('json', json)
42
- sendMessage((json.distUserId + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), (JSON.parse(window.sessionStorage.getItem('sigData')).account + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), 'chat', JSON.stringify(json))
43
- }
44
- // window.RemoteShellBridge.callNimIM(method, JSON.stringify(json), callId)
45
- }
46
- /**
47
- * 生成索引ID
48
- * @returns {string}
49
- * @private
50
- */
51
- function _generateId() {
52
- // 增加索引
53
- index++
54
- // 超出最大值后,循环
55
- if (index >= maxIndex) {
56
- index = 0
57
- }
58
- // 返回id
59
- return 'remote_' + index
60
- }
61
- export {
62
- _generateId,
63
- callNimIM,
64
- }