取消cdn加载&调整快速入口进入房间

This commit is contained in:
fan 2020-04-17 09:13:40 +08:00
parent 46d95bf715
commit 4231966cac
11 changed files with 37 additions and 152 deletions

View File

@ -10,18 +10,18 @@
<title><%= webpackConfig.name %></title>
<script src="/static/inflate.min.js"></script>
<script src="/static/three.min.js"></script>
<% if (process.env.VUE_APP_PRO !== 'local') { %>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/theme-chalk/index.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.4.0-rc.1/echarts-en.common.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vuex/3.1.0/vuex.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/3.1.2/vue-router.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/index.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/locale/en.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/locale/zh-CN.min.js"></script>
<% } %>
<!--<% if (process.env.VUE_APP_PRO !== 'local') { %>-->
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/theme-chalk/index.css">-->
<!--<link href="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.4.0-rc.1/echarts-en.common.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/vuex/3.1.0/vuex.min.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/3.1.2/vue-router.min.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/index.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/locale/en.min.js"></script>-->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/locale/zh-CN.min.js"></script>-->
<!--<% } %>-->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.4.0/sockjs.min.js"></script>-->
</head>
<body>

View File

@ -1,5 +1,5 @@
import en from './langs/en/index_APP_TARGET';
import zh from './langs/zh/index_APP_TARGET';
import en from './langs/en/index';
import zh from './langs/zh/index';
export default {
en,

View File

@ -1,63 +0,0 @@
import ELEMENT from 'element-ui';
import map from './map';
import global from './global';
import router from './router';
import lesson from './lesson';
import error from './error';
import rules from './rules';
import scriptRecord from './scriptRecord';
import tip from './tip';
import system from './system';
import orderAuthor from './orderAuthor';
import teach from './teach';
import publish from './publish';
import permission from './permission';
import replay from './replay';
import planMonitor from './planMonitor';
import screenMonitor from './screenMonitor';
import demonstration from './demonstration';
import exam from './exam';
import dashboard from './dashboard';
import jlmap3d from './jlmap3d';
import display from './display';
import joinTraining from './joinTraining';
import trainRoom from './trainRoom';
import menu from './menu';
import ibp from './ibp';
import approval from './approval';
import systemGenerate from './systemGenerate';
import login from './login';
import designPlatform from './designPlatform';
export default {
...ELEMENT.lang.en,
map,
global,
router,
lesson,
teach,
error,
rules,
scriptRecord,
tip,
system,
orderAuthor,
publish,
permission,
replay,
planMonitor,
screenMonitor,
demonstration,
exam,
dashboard,
jlmap3d,
display,
joinTraining,
trainRoom,
menu,
ibp,
approval,
systemGenerate,
login,
designPlatform
};

View File

@ -1,63 +0,0 @@
import ELEMENT from 'element-ui';
import map from './map';
import global from './global';
import router from './router';
import lesson from './lesson';
import error from './error';
import rules from './rules';
import scriptRecord from './scriptRecord';
import tip from './tip';
import system from './system';
import orderAuthor from './orderAuthor';
import teach from './teach';
import publish from './publish';
import permission from './permission';
import replay from './replay';
import planMonitor from './planMonitor';
import screenMonitor from './screenMonitor';
import demonstration from './demonstration';
import exam from './exam';
import dashboard from './dashboard';
import jlmap3d from './jlmap3d';
import display from './display';
import joinTraining from './joinTraining';
import trainRoom from './trainRoom';
import menu from './menu';
import ibp from './ibp';
import approval from './approval';
import systemGenerate from './systemGenerate';
import login from './login';
import designPlatform from './designPlatform';
export default {
...ELEMENT.lang.zhCN,
map,
global,
router,
lesson,
error,
teach,
rules,
scriptRecord,
tip,
system,
orderAuthor,
publish,
permission,
replay,
planMonitor,
screenMonitor,
demonstration,
exam,
dashboard,
jlmap3d,
display,
joinTraining,
trainRoom,
menu,
ibp,
approval,
systemGenerate,
login,
designPlatform
};

View File

@ -1,8 +1,8 @@
// import Vue from 'vue';
import Vue from 'vue';
import Router from 'vue-router';
// import VueRouter from 'vue-router';
// Vue.use(Router);
Vue.use(Router);
/* Layout */
const Layout = () => import('@/layout');

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.41:9000'; // 张赛

View File

@ -42,7 +42,16 @@ StompClient.prototype = {
// 注意sockjs会做降级处理优先处理websockets若浏览器不支持websockets
// 则会降级为xhr_streaming轮询继续不支持的时候会降级为xhr-polling
this.socket = new SockJS(websocketUrl + getToken());
var _transportClose = this.socket._transportClose;
const that111 = this;
this.socket._transportClose = function(code, reason) {
console.log(code, reason, '================', this._transport, this._transport.close);
// if (this._transport && this._transport.close) {
// this._transport.close();
// }
this._transportClose();
_transportClose.call(this, code, reason);
};
// 获取 STOMP 子协议的客户端对象
this.clientIns = Stomp.over(this.socket);
@ -168,8 +177,10 @@ StompClient.prototype = {
},
disconnect() {
console.log('---------------------');
if (this.clientIns && this.clientIns.connected) {
this.clientIns.disconnect();
this.socket.close();
this.clientIns = null;
}
this.status = false;

View File

@ -122,7 +122,7 @@ export default {
}
this.$router.push({ path: path, query: query });
} else if (data.state == '01') {
const query = { group: data.group, drawWay: true };
const query = { group: data.group, drawWay: rest.data.drawWay };
this.$router.push({ path: `/trainroom`, query: query });
}
} catch (e) {

View File

@ -117,12 +117,12 @@ module.exports = {
}
]));
const externalsConfig = {
'vue': 'Vue',
'vuex': 'Vuex',
'vue-router': 'VueRouter',
'nprogress': 'NProgress',
'echarts': 'echarts',
'element-ui': 'ELEMENT'
// 'vue': 'Vue',
// 'vuex': 'Vuex',
// 'vue-router': 'VueRouter',
// 'nprogress': 'NProgress',
// 'echarts': 'echarts',
// 'element-ui': 'ELEMENT'
};
config.externals = process.env.NODE_ENV === 'Local' || process.env.VUE_APP_PRO === 'local' ? {} : externalsConfig; // 配置CDN使用
},