完成签约之后直接添加人员,录入下发凭证
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
634 B

var socketId = 0;
chrome.app.runtime.onLaunched.addListener(function() {
if (socketId) {
console.log("close socket " +socketId);
chrome.sockets.tcpServer.close(socketId);
socketId = 0;
}
chrome.app.window.create('main.html', {
id: "mainwin",
innerBounds: {
width: 670,
height: 350,
minWidth: 670,
minHeight: 350
}
});
})
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse)
{
socketId = request.socketId;
});
chrome.runtime.onSuspend.addListener(function() {
if(socketId) {
chrome.sockets.tcpServer.close(socketId);
socketId = 0;
}
});