u
This commit is contained in:
parent
f6e0ff9660
commit
9525930dfb
@ -129,6 +129,10 @@ export default {
|
|||||||
port = window?.location?.port?.replace(':', '')
|
port = window?.location?.port?.replace(':', '')
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
if (!hostname) {
|
||||||
|
// 如果没有配置 hostname,又不是在 H5 环境,则最后的默认值是 localhost
|
||||||
|
hostname = 'localhost'
|
||||||
|
}
|
||||||
|
|
||||||
return `${protocol}://${hostname}:${port}/${route.replace(/^\//, '')}`
|
return `${protocol}://${hostname}:${port}/${route.replace(/^\//, '')}`
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user