use SERVER_PROTOCOL as default port
This commit is contained in:
parent
223b9009fe
commit
c8ae157906
6
index.js
6
index.js
@ -88,16 +88,16 @@ module.exports = {
|
||||
// #ifdef H5
|
||||
|| window.location.hostname
|
||||
// #endif
|
||||
protocol = 'https:'
|
||||
protocol = this.SERVER_PROTOCOL || 'https'
|
||||
} else {
|
||||
hostname =
|
||||
// #ifdef H5
|
||||
window.location.hostname ||
|
||||
// #endif
|
||||
this.SERVER_HOSTNAME_DEV // 在本机的手机模拟器里可以,在虚拟机的浏览器里也可以,但是运行到连接的iPhone里就无法连接,不知为何
|
||||
protocol = 'http:'
|
||||
protocol = 'http'
|
||||
}
|
||||
return `${protocol}//${hostname}:${port}/${route}`
|
||||
return `${protocol}://${hostname}:${port}/${route}`
|
||||
},
|
||||
|
||||
makeBgUrl(path) {
|
||||
|
Loading…
Reference in New Issue
Block a user