|
@@ -24,20 +24,22 @@ export function getWsExportUrl() {
|
|
|
|
|
|
export function patternNginxWsUrl() {
|
|
export function patternNginxWsUrl() {
|
|
var itemUrl = document.location.origin;
|
|
var itemUrl = document.location.origin;
|
|
- console.log(itemUrl)
|
|
|
|
- if (itemUrl.includes(hostIp)) {
|
|
|
|
- return "ws://" + hostIp + "/ws/"
|
|
|
|
- } else {
|
|
|
|
- return "ws://120.46.159.163/ws/"
|
|
|
|
- }
|
|
|
|
|
|
+ // console.log(itemUrl)
|
|
|
|
+ // if (itemUrl.includes(hostIp)) {
|
|
|
|
+ // return "ws://" + hostIp + "/ws/"
|
|
|
|
+ // } else {
|
|
|
|
+ // return "ws://120.46.159.163/ws/"
|
|
|
|
+ // }
|
|
|
|
+ return itemUrl.replace('http', 'ws') + '/ws/'
|
|
}
|
|
}
|
|
|
|
|
|
export function patternNginxExportWsUrl() {
|
|
export function patternNginxExportWsUrl() {
|
|
- var itemUrl = document.location.origin;
|
|
|
|
- console.log(itemUrl)
|
|
|
|
- if (itemUrl.includes(hostIp)) {
|
|
|
|
- return "ws://" + hostIp + "/ws/"
|
|
|
|
- } else {
|
|
|
|
- return "ws://120.46.159.163/ws/"
|
|
|
|
- }
|
|
|
|
|
|
+ // var itemUrl = document.location.origin;
|
|
|
|
+ // console.log(itemUrl)
|
|
|
|
+ // if (itemUrl.includes(hostIp)) {
|
|
|
|
+ // return "ws://" + hostIp + "/ws/"
|
|
|
|
+ // } else {
|
|
|
|
+ // return "ws://120.46.159.163/ws/"
|
|
|
|
+ // }
|
|
|
|
+ return itemUrl.replace('http', 'ws') + '/ws-production/'
|
|
}
|
|
}
|