Commit d596c667 by 李君

socket服务地址

1 parent a498f4cd
window._serverHost = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? '36.112.68.214:9999' : window.location.host window._serverHost = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? 'store.keliuyun.com/' : window.location.host
window._baseUrl = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? 'http://36.112.68.214:9999/tool/' : `http://${window._serverHost}/tool/` window._baseUrl = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? 'https://store.keliuyun.com/tool/' : `https://${window._serverHost}/tool/`
window._baseImgUrl = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? 'http://36.112.68.214:9999/images/' : `${window.location.origin}/images/` window._baseImgUrl = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? 'https://store.keliuyun.com/images/' : `${window.location.origin}/images/`
window._socketUrl = ['localhost', '192.168.1.168'].includes(window.location.hostname) ? `wss://${window._serverHost}/` : `wss://${window._serverHost}/`
const log = console.log.bind(console) const log = console.log.bind(console)
...@@ -253,7 +253,7 @@ export default { ...@@ -253,7 +253,7 @@ export default {
webSocketMap[scheduleType].close() webSocketMap[scheduleType].close()
} }
webSocketMap[scheduleType] = new WebSocket(`ws://${window._serverHost}/recal/schedule/${scheduleType}`) webSocketMap[scheduleType] = new WebSocket(`${window._socketUrl}/recal/schedule/${scheduleType}`)
webSocketMap[scheduleType].onopen = () => { webSocketMap[scheduleType].onopen = () => {
queryData(scheduleType) queryData(scheduleType)
......
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
} }
resultList.value = [] resultList.value = []
webSocket = new WebSocket(`ws://${window._serverHost}/recal/schedule/rebuildFeatureLib${queryForm.featureRevisitType}`) webSocket = new WebSocket(`${window._socketUrl}/recal/schedule/rebuildFeatureLib${queryForm.featureRevisitType}`)
webSocket.onopen = queryData webSocket.onopen = queryData
......
...@@ -191,7 +191,7 @@ export default { ...@@ -191,7 +191,7 @@ export default {
} }
resultList.value = [] resultList.value = []
webSocket = new WebSocket(`ws://${window._serverHost}/recal/schedule/revisitFeature${queryForm.featureRevisitType}`) webSocket = new WebSocket(`${window._socketUrl}/recal/schedule/revisitFeature${queryForm.featureRevisitType}`)
webSocket.onopen = queryData webSocket.onopen = queryData
......
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
} }
resultList.value = [] resultList.value = []
webSocket = new WebSocket(`ws://${window._serverHost}/recal/schedule/rematchPerson${queryForm.featureRevisitType}`) webSocket = new WebSocket(`${window._socketUrl}/recal/schedule/rematchPerson${queryForm.featureRevisitType}`)
webSocket.onopen = queryData webSocket.onopen = queryData
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!