From c8ae157906d82569e683689f31f231dbd5621ce1 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Mon, 6 Sep 2021 20:40:17 +0800 Subject: [PATCH] use SERVER_PROTOCOL as default port --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 8c21d96..faec331 100644 --- a/index.js +++ b/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) {