fix : bug
This commit is contained in:
+2
-2
@@ -86,7 +86,7 @@ export default class WebSocketUtil {
|
||||
// console.log('WebSocket连接已关闭', res);
|
||||
clearInterval(this.heartbeatTimer); // 清除心跳计时器
|
||||
this.triggerEvent('close', res); // 触发连接关闭事件
|
||||
this.tryReconnect(); // 尝试重连
|
||||
// this.tryReconnect(); // 尝试重连
|
||||
});
|
||||
|
||||
// 监听WebSocket错误事件
|
||||
@@ -106,7 +106,7 @@ export default class WebSocketUtil {
|
||||
*/
|
||||
on(event, callback) {
|
||||
if (this.callbacks[event]) {
|
||||
this.callbacks[event].push(callback);
|
||||
this.callbacks[event] = [callback];
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -589,6 +589,7 @@
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8",
|
||||
"navigationStyle": "custom",
|
||||
"screenOrientation": "portrait",
|
||||
"app-plus": {
|
||||
"titleView": false,
|
||||
"bounce": "none",
|
||||
|
||||
@@ -791,6 +791,9 @@
|
||||
initsocketTask();
|
||||
};
|
||||
onLoad(() => {
|
||||
//#ifdef APP-PLUS
|
||||
plus.screen.lockOrientation('portrait-primary')
|
||||
// #endif
|
||||
changeAppHeightBottom();
|
||||
if (!common.isLogin()) {
|
||||
common.navigateTo('/pages/login/login');
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
onShow,
|
||||
onLoad,
|
||||
onUnload,
|
||||
onLaunch,
|
||||
onBackPress
|
||||
} from '@dcloudio/uni-app';
|
||||
import common from '@/common/common';
|
||||
@@ -311,6 +312,7 @@
|
||||
let _id = new Date().getTime() + 'id';
|
||||
if (rtnCode === '0000') {
|
||||
if (commond === 'ASK-OPEN') {
|
||||
console.log('ASK-OPEN!',body)
|
||||
// 新连接
|
||||
sendMessage({
|
||||
commond: 'ASK-START',
|
||||
@@ -324,7 +326,7 @@
|
||||
return;
|
||||
}
|
||||
if (commond === 'ASK-START') {
|
||||
// console.log('开启对话!')
|
||||
console.log('开启对话!',body)
|
||||
execId.value = body.execId;
|
||||
return;
|
||||
}
|
||||
@@ -477,8 +479,13 @@
|
||||
talkingType.value = params.type;
|
||||
isPreview.value = params.isPreview === '1'
|
||||
getDetailInfo()
|
||||
console.log('onLoad')
|
||||
//#ifdef APP-PLUS
|
||||
plus.screen.lockOrientation('portrait-primary')
|
||||
// #endif
|
||||
});
|
||||
onUnload(() => {
|
||||
console.log('onUnload')
|
||||
watchFlag.value = 1;
|
||||
sendMessage({
|
||||
commond: 'ASK-STOP',
|
||||
@@ -487,7 +494,11 @@
|
||||
}
|
||||
})
|
||||
socketStore?.closeSocket();
|
||||
execId.value = ''
|
||||
});
|
||||
onLaunch(() => {
|
||||
console.log('onLaunch')
|
||||
})
|
||||
onMounted(() => {
|
||||
// getDetailInfo()
|
||||
})
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8",
|
||||
"navigationStyle": "custom",
|
||||
"screenOrientation": "portrait",
|
||||
"app-plus": {
|
||||
"titleView": false,
|
||||
"bounce": "none",
|
||||
|
||||
Reference in New Issue
Block a user