请求url兼容

  1. let protocol = location.protocol === 'https:'
  2.  
    ? 'wss://localhost:8888'
  3.  
    : 'ws://localhost:8889';
posted @ 2020-12-25 16:00  KAIGUO424  阅读(56)  评论(0编辑  收藏  举报