add option SERVER_PROTOCOL_DEV
This commit is contained in:
parent
abd64f9b2b
commit
f01dff259a
8
index.js
8
index.js
@ -103,11 +103,11 @@ export default {
|
|||||||
protocol = this.SERVER_PROTOCOL || 'https'
|
protocol = this.SERVER_PROTOCOL || 'https'
|
||||||
} else {
|
} else {
|
||||||
hostname =
|
hostname =
|
||||||
// #ifdef H5
|
|
||||||
window.location.hostname ||
|
|
||||||
// #endif
|
|
||||||
this.SERVER_HOSTNAME_DEV // 在本机的手机模拟器里可以,在虚拟机的浏览器里也可以,但是运行到连接的iPhone里就无法连接,不知为何
|
this.SERVER_HOSTNAME_DEV // 在本机的手机模拟器里可以,在虚拟机的浏览器里也可以,但是运行到连接的iPhone里就无法连接,不知为何
|
||||||
protocol = 'http'
|
// #ifdef H5
|
||||||
|
|| window.location.hostname
|
||||||
|
// #endif
|
||||||
|
protocol = this.SERVER_PROTOCOL_DEV || 'http'
|
||||||
}
|
}
|
||||||
return `${protocol}://${hostname}:${port}/${route.replace(/^\//, '')}`
|
return `${protocol}://${hostname}:${port}/${route.replace(/^\//, '')}`
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user