Commit d08fba1e authored by 罗超's avatar 罗超

修复部分已知BUG

parent f25b83b3
...@@ -9,8 +9,11 @@ const WinReg = require('winreg') ...@@ -9,8 +9,11 @@ const WinReg = require('winreg')
const fs = require('fs') const fs = require('fs')
const electron = require('electron') const electron = require('electron')
const screenshot = require('screenshot-desktop') const screenshot = require('screenshot-desktop')
const SDK = require('../../static/sdk/NIM_Web_NIM_nodejs_v5.9.1.js') const SDK = require('../../static/sdk/NIM_Web_SDK_nodejs_v6.9.0.js')
const http = require('http') const http = require('http')
// const unhandled = require('electron-unhandled');
// unhandled();
const ipc = electron.ipcMain const ipc = electron.ipcMain
const shell = electron.shell const shell = electron.shell
...@@ -644,6 +647,13 @@ ipc.on('setClipboard', function(event, content, type) { ...@@ -644,6 +647,13 @@ ipc.on('setClipboard', function(event, content, type) {
clipboard.writeText(content) clipboard.writeText(content)
} }
}) })
ipc.on('setLineStatus', function(event, status) {
if (status == 1) {
appIcon.setImage(path.join(__static, './icons/logo.png'))
} else {
appIcon.setImage(path.join(__static, './icons/logo_offline.png'))
}
})
ipc.on('getNetworkImage', function(event, url) { ipc.on('getNetworkImage', function(event, url) {
http.get(url, function(res) { http.get(url, function(res) {
var chunks = []; var chunks = [];
......
...@@ -97,11 +97,24 @@ export default { ...@@ -97,11 +97,24 @@ export default {
left:0, left:0,
currentAccount:'' currentAccount:''
}, },
reconnecloading:false reconnecloading:false,
isdissconnection:false
}; };
}, },
mounted() { mounted() {
const updateOnlineStatus = () => {
if(navigator.onLine && this.isdissconnection){
this.isdissconnection=false
setTimeout(() => {
this.reconnect()
}, 5000);
}else if(!navigator.onLine){
this.isdissconnection=true
}
}
window.addEventListener('online', updateOnlineStatus)
window.addEventListener('offline', updateOnlineStatus)
updateOnlineStatus()
// var devInnerHeight = 658.0; // var devInnerHeight = 658.0;
// var devDevicePixelRatio = 1.5; // var devDevicePixelRatio = 1.5;
// var devScaleFactor = 1.5; // var devScaleFactor = 1.5;
...@@ -231,6 +244,7 @@ export default { ...@@ -231,6 +244,7 @@ export default {
}, },
computed: { computed: {
netState(){ netState(){
return this.$store.state.isNetError return this.$store.state.isNetError
} }
} }
......
...@@ -401,11 +401,11 @@ export default { ...@@ -401,11 +401,11 @@ export default {
if(msgs.length>0) if(msgs.length>0)
this.lstTimer=msgs[msgs.length-1].time this.lstTimer=msgs[msgs.length-1].time
if(this.scene=='team'){ if(this.scene=='team'){
// msgs=msgs.filter(x=>{ msgs=msgs.filter(x=>{
// if(x.type!='notification' ||(x.type=='notification' && !x.attach.team.custom)) if(x.type!='notification' ||(x.type=='notification' && !x.attach.team.custom))
// return x return x
// return; return;
// }) })
} }
// console.log(msgs) // console.log(msgs)
return msgs; return msgs;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment