修复标题总是提示新消息问题

pull/23/head
taoshihan1991 4 years ago
parent 36fe764ca4
commit 23a599f7ca

@ -366,6 +366,7 @@ new Vue({
$('.faceBox').hide(); $('.faceBox').hide();
}); });
window.onfocus = function () { window.onfocus = function () {
window.parent.postMessage({type:"focus"},"*");
if(_this.socketClosed){ if(_this.socketClosed){
return; return;
} }

@ -78,9 +78,13 @@ GOFLY.init=function(config){
var news=$("#launchIcon").text(); var news=$("#launchIcon").text();
$("#launchIcon").text(++news).show(); $("#launchIcon").text(++news).show();
} }
if(msg.type=="focus"){
clearTimeout(_this.titleTimer);
document.title = _this.originTitle;
}
}); });
window.onfocus = function () { window.onfocus = function () {
clearTimeout(this.titleTimer); clearTimeout(_this.titleTimer);
console.log(1); console.log(1);
document.title = _this.originTitle; document.title = _this.originTitle;
}; };

Loading…
Cancel
Save