|
@@ -300,17 +300,24 @@ export function windowSendInit() {
|
|
|
export function wssInit() {
|
|
|
return new Promise(( resolve,reject ) => {
|
|
|
try {
|
|
|
+ console.log('platform====>303');
|
|
|
const socket = new SockJS(`${ getUrl() }/hafengWebsocket?token=${ window.token }`);
|
|
|
+ console.log('platform====>305');
|
|
|
window.stompClient = Stomp.over(socket);
|
|
|
- window.stompClient.debug = null;
|
|
|
+ console.log('platform====>307');
|
|
|
+ window.stompClient.debug = false;
|
|
|
+ console.log('platform====>308');
|
|
|
windowSendInit();
|
|
|
+ console.log('platform====>311');
|
|
|
window.stompClient.connect({},( frame ) => {
|
|
|
+ console.log('platform====>312');
|
|
|
// 请求 projectId
|
|
|
window.toWXSendMsg({
|
|
|
type: 'getProjectId',
|
|
|
options: {},
|
|
|
});
|
|
|
window.subscribe('projectId',( options ) => {
|
|
|
+ console.log('platform====>320');
|
|
|
resolve(options);
|
|
|
});
|
|
|
});
|