diff --git a/src/components/TestPanel.vue b/src/components/TestPanel.vue index c74c5ef..f4ddc71 100644 --- a/src/components/TestPanel.vue +++ b/src/components/TestPanel.vue @@ -334,7 +334,7 @@ export default { this.getAssList() } else { // 练习 if (Cookie.get('doneProjectId')) { // 已经做完了实验,则直接恢复项目id - this.projectId = +Cookie.get('doneProjectId') + if (!this.projectPermissions) this.projectId = +Cookie.get('doneProjectId') } else { // 没有初次加载的标识,说明不是第一次进来,而是当前页面刷新后进来这个方法,这时候则查最近一次跑的项目是哪个 if (Cookie.get('admin-loaded')) { @@ -1118,7 +1118,7 @@ export default { // 消息队列获取 connect () { - let ws = new WebSocket(this.$config.isTest ? `ws://139.159.153.48:15674/ws` : `wss://python.occupationlab.com/ws`); + let ws = new WebSocket(`wss://python.occupationlab.com/ws`); // let ws = new WebSocket(`wss://python.occupationlab.com/ws`); this.client = Stomp.over(ws); this.client.heartbeat.outgoing = 0 @@ -1129,7 +1129,7 @@ export default { passcode: this.$config.isTest ? 'huorantest2024' : 'huoran2024' }; //进行连接 - this.client.connect(headers.login, headers.passcode, this.onConnected, this.onFailed, 'pyhost'); + this.client.connect(headers.login, headers.passcode, this.onConnected, this.$config.isTest ? `pytest` : 'pyhost') }, onConnected () { //订阅频道 diff --git a/src/config/index.js b/src/config/index.js index cfb6e24..7e849b0 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -2,7 +2,7 @@ import Cookie from 'js-cookie' const url = location.host const isDev = process.env.NODE_ENV === 'development' //是否本地 -const isTest = url.includes('121.37.12.51') //测试服 +const isTest = url.includes('118.31.167.228') //测试服 const isHh = url.includes('10.196.131.73') //是否是河海版本 const isPro = url.includes('occupationlab.com') //是否职站生产 const isZxy = url.includes('izhixinyun.com') //是否智信云 @@ -11,16 +11,16 @@ let vscodeUrl = 'http://172.16.40.56:8088/' let host = location.origin + '/' // let host = `https://izhixinyun.com/` -let bankPath = `${location.origin}/banksystem` // 银行系统 -// 121.37.12.51 | 192.168.31.151 +let bankPath = `${location.origin}/systembank` // 银行系统 +// 118.31.167.228 | 192.168.31.151 if (isDev) { - // host = 'http://192.168.31.51:9000/' - host = 'http://121.37.12.51/' + host = 'http://192.168.31.217:9000/' + host = 'http://118.31.167.228/' // host = 'https://izhixinyun.com/' bankPath = `http://${location.hostname}:8093` } else if (isPro) { host = 'https://occupationlab.com/' - bankPath = `https://www.huorantech.cn/banksystem` + bankPath = `https://www.huorantech.cn/systembank` vscodeUrl = 'https://vscode.occupationlab.com' } else if (isZxy) { vscodeUrl = 'https://vscode.izhixinyun.com'