完成签约之后直接添加人员,录入下发凭证
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.

28 lines
634 B

  1. var socketId = 0;
  2. chrome.app.runtime.onLaunched.addListener(function() {
  3. if (socketId) {
  4. console.log("close socket " +socketId);
  5. chrome.sockets.tcpServer.close(socketId);
  6. socketId = 0;
  7. }
  8. chrome.app.window.create('main.html', {
  9. id: "mainwin",
  10. innerBounds: {
  11. width: 670,
  12. height: 350,
  13. minWidth: 670,
  14. minHeight: 350
  15. }
  16. });
  17. })
  18. chrome.runtime.onMessage.addListener(function(request, sender, sendResponse)
  19. {
  20. socketId = request.socketId;
  21. });
  22. chrome.runtime.onSuspend.addListener(function() {
  23. if(socketId) {
  24. chrome.sockets.tcpServer.close(socketId);
  25. socketId = 0;
  26. }
  27. });