修改测试打包环境和websocket日志
This commit is contained in:
parent
998fcf7146
commit
1165524548
@ -1,5 +1,5 @@
|
||||
# just a flag
|
||||
NODE_ENV = 'production'
|
||||
NODE_ENV = 'test'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user