diff --git a/public/index.html b/public/index.html index 2f384b84c..67cc82f17 100644 --- a/public/index.html +++ b/public/index.html @@ -10,18 +10,18 @@ <%= webpackConfig.name %> - <% if (process.env.VUE_APP_PRO !== 'local') { %> - - - - - - - - - - - <% } %> + + + + + + + + + + + + diff --git a/src/i18n/index.js b/src/i18n/index.js index ff63ffa44..2aa7c4e2b 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -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, diff --git a/src/i18n/langs/en/index_HYD.js b/src/i18n/langs/en/index.js similarity index 100% rename from src/i18n/langs/en/index_HYD.js rename to src/i18n/langs/en/index.js diff --git a/src/i18n/langs/en/index_Common.js b/src/i18n/langs/en/index_Common.js deleted file mode 100644 index a9afb2e9d..000000000 --- a/src/i18n/langs/en/index_Common.js +++ /dev/null @@ -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 -}; diff --git a/src/i18n/langs/zh/index_HYD.js b/src/i18n/langs/zh/index.js similarity index 100% rename from src/i18n/langs/zh/index_HYD.js rename to src/i18n/langs/zh/index.js diff --git a/src/i18n/langs/zh/index_Common.js b/src/i18n/langs/zh/index_Common.js deleted file mode 100644 index 48ee88d10..000000000 --- a/src/i18n/langs/zh/index_Common.js +++ /dev/null @@ -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 -}; diff --git a/src/router/index_Common.js b/src/router/index_Common.js index 254fcc544..4b5946bb9 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -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'); diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 7cedc6817..e9046878d 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -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'; // 张赛 diff --git a/src/utils/sock.js b/src/utils/sock.js index dfa76679c..e24c698b2 100644 --- a/src/utils/sock.js +++ b/src/utils/sock.js @@ -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; diff --git a/src/views/demonstration/deomonList/index_Common.vue b/src/views/demonstration/deomonList/index_Common.vue index c90ebf6b8..1a3492f92 100644 --- a/src/views/demonstration/deomonList/index_Common.vue +++ b/src/views/demonstration/deomonList/index_Common.vue @@ -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) { diff --git a/vue.config.js b/vue.config.js index 2fe40badc..a77409465 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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使用 },