From 223b9009fe7c66edfd9631fcb0842ca7e88bb90e Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Sun, 5 Sep 2021 23:10:22 +0800 Subject: [PATCH] remove sleep function --- index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 83531d8..8c21d96 100644 --- a/index.js +++ b/index.js @@ -22,8 +22,6 @@ module.exports = { BACKEND: 'SERVER', // 通过变量来动态切换后台类型:服务器 SERVER,或云服务 CLOUD。应当根据实际需要,在前端所用的 unitool 里覆盖。 - sleep: (ms) => new Promise((resolve, reject) => setTimeout(resolve, ms)), - // 快速输出详尽提示,可用来取代 console.log clog(...message) { console.log( @@ -79,7 +77,10 @@ module.exports = { return route } - let port = this.SERVER_PORT || 6789 + let port = this.SERVER_PORT + // #ifdef H5 + || window.location.port + // #endif let hostname let protocol if (process.env.NODE_ENV === 'production') {