From 77095e74e224380cc20871d3c64337b37326c9cf Mon Sep 17 00:00:00 2001 From: dushixiang <798148596@qq.com> Date: Sat, 9 Jan 2021 16:32:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=8F=E8=AE=AE=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4?= =?UTF-8?q?https=E7=AB=99=E7=82=B9=E4=B8=8D=E8=83=BD=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/common/constants.js | 4 ++-- web/src/components/dashboard/Dashboard.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/src/common/constants.js b/web/src/common/constants.js index 5c3abe9..2d8289f 100644 --- a/web/src/common/constants.js +++ b/web/src/common/constants.js @@ -1,6 +1,6 @@ // prod let wsPrefix; -if (window.location.protocol === 'https') { +if (window.location.protocol === 'https:') { wsPrefix = 'wss:' } else { wsPrefix = 'ws:' @@ -8,7 +8,7 @@ if (window.location.protocol === 'https') { export const server = ''; export const wsServer = wsPrefix + window.location.host; -export const prefix = window.location.protocol + ':' + window.location.host; +export const prefix = window.location.protocol + '//' + window.location.host; // dev // export const server = '//127.0.0.1:8088'; diff --git a/web/src/components/dashboard/Dashboard.js b/web/src/components/dashboard/Dashboard.js index 7a51abc..a2a1ec2 100644 --- a/web/src/components/dashboard/Dashboard.js +++ b/web/src/components/dashboard/Dashboard.js @@ -52,7 +52,6 @@ class Dashboard extends Component { this.setState({ session: result['data'] }) - console.log('set session', this.state.session) } }