From 1165524548a8f751a8d7cb8d3e84b62ff05c02ef Mon Sep 17 00:00:00 2001 From: walkersxq Date: Fri, 22 Nov 2019 02:11:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E6=89=93?= =?UTF-8?q?=E5=8C=85=E7=8E=AF=E5=A2=83=E5=92=8Cwebsocket=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.staging | 2 +- src/utils/sock.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.env.staging b/.env.staging index e091a3230..74355abe2 100644 --- a/.env.staging +++ b/.env.staging @@ -1,5 +1,5 @@ # just a flag -NODE_ENV = 'production' +NODE_ENV = 'test' # base api VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud' diff --git a/src/utils/sock.js b/src/utils/sock.js index ffdba8c13..371093ca9 100644 --- a/src/utils/sock.js +++ b/src/utils/sock.js @@ -10,6 +10,7 @@ import Stomp from 'stompjs'; // var Stomp = require('stompjs'); const isDev = process.env.NODE_ENV === 'development'; +const isTest = process.env.NODE_ENV === 'test'; const websocketUrl = `${getBaseUrl()}/joylink-websocket?token=`; // const websocketUrl = `http://192.168.3.6:9000/joylink-websocket?token=`; @@ -164,7 +165,7 @@ StompClient.prototype = { closeStompDebug() { if (this.clientIns) { this.clientIns.debug = undefined; - if (isDev) { + if (isDev || isTest) { this.clientIns.debug = function (message) { console.debug(message); };