diff --git a/.env.development b/.env.development index 535c20d5e..c0924475f 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,7 @@ NODE_ENV = 'development' # VUE_APP_BASE_API = 'https://joylink.club/jlcloud' # VUE_APP_BASE_API = 'http://192.168.3.4:9000' VUE_APP_BASE_API = 'http://192.168.3.6:9000' -VUE_APP_VOICE_API = 'https://test.joylink.club' +VUE_APP_VOICE_API = 'https://test.joylink.club/jlcloud' # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, # to control whether the babel-plugin-dynamic-import-node plugin is enabled. diff --git a/.env.native b/.env.native index af5c4a6d3..09eb3fd7c 100644 --- a/.env.native +++ b/.env.native @@ -4,4 +4,4 @@ VUE_APP_PRO = 'local' # base api VUE_APP_BASE_API = 'https://joylink.club/jlcloud' -VUE_APP_VOICE_API = 'https://joylink.club' +VUE_APP_VOICE_API = 'https://joylink.club/jlcloud' diff --git a/.env.production b/.env.production index 684381f92..68c9d7458 100644 --- a/.env.production +++ b/.env.production @@ -3,4 +3,4 @@ NODE_ENV = 'production' # base api VUE_APP_BASE_API = 'https://joylink.club/jlcloud' -VUE_APP_VOICE_API = 'https://joylink.club' +VUE_APP_VOICE_API = 'https://joylink.club/jlcloud' diff --git a/.env.staging b/.env.staging index 41dbe65d7..2e62c739e 100644 --- a/.env.staging +++ b/.env.staging @@ -3,4 +3,4 @@ NODE_ENV = 'production' # base api VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud' -VUE_APP_VOICE_API = 'https://test.joylink.club' +VUE_APP_VOICE_API = 'https://test.joylink.club/jlcloud' diff --git a/src/views/demonstration/deomonTopic/index.vue b/src/views/demonstration/deomonTopic/index.vue index 30a8347e2..a73851405 100644 --- a/src/views/demonstration/deomonTopic/index.vue +++ b/src/views/demonstration/deomonTopic/index.vue @@ -72,7 +72,6 @@ export default { await this.$store.dispatch('socket/setRoomSubscribe', false); }, async handleJoin() { - debugger; try { this.loading = true; const rest = await getPublishMapInfo(this.mapId); diff --git a/src/views/newMap/displayNew/chatView/chatBox.vue b/src/views/newMap/displayNew/chatView/chatBox.vue index 84e0931a8..3df4ee39a 100644 --- a/src/views/newMap/displayNew/chatView/chatBox.vue +++ b/src/views/newMap/displayNew/chatView/chatBox.vue @@ -4,7 +4,7 @@
- +
{{ headerTitle }}
@@ -30,7 +30,8 @@
@@ -54,7 +55,7 @@ import ChatCreateGroup from './chatCreateGroup'; import ChatMemberList from './chatMemberList'; import ChatCoversitionList from './chatCoversitionList'; import RecordRTC from 'recordrtc'; -import {uploadAudioFileNew} from '@/api/chat'; +import {uploadAudioFileNew, quitCoversition} from '@/api/chat'; export default { name: 'ChatBox', components:{ @@ -82,6 +83,8 @@ export default { currentCoversition:{}, seconds:0, inter:null, + isHasCoversition:false, + quitLoading:false, recorders: null, microphone:null, scriptTip:'', @@ -94,7 +97,10 @@ export default { }, computed:{ isShow() { - return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE'; + return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && !this.isHasCoversition; + }, + isButtonShow() { + return this.userRole != 'ADMIN' && this.userRole != 'AUDIENCE' && this.isHasCoversition; } }, watch: { @@ -144,21 +150,39 @@ export default { setSetting(data) { this.form = data; }, + hideAddCoversition() { + this.isHasCoversition = true; + }, setCurrentCoversition(coversition) { - this.currentCoversition = coversition; - if (coversition.all) { + if (coversition && coversition.id) { + this.currentCoversition = coversition; this.headerTitle = coversition.name; + } else { + this.headerTitle = ''; } if (this.recordSending) { this.cancleRecording(); } this.$refs.chatContent.scrollTop(); }, + quitCoversition() { + this.quitLoading = true; + quitCoversition(this.group, this.currentCoversition.id).then(res=>{ + this.quitLoading = false; + this.currentCoversition = {all:undefined, id:null}; + this.$refs.chatCoversitionList.initPage(true); + this.isHasCoversition = false; + }).catch(error=>{ + this.$messageBox('退出会话失败: ' + error.message); + this.quitLoading = false; + }); + }, setHeadTitle(headerTitle) { this.headerTitle = headerTitle; }, addCoversition({data, headerTitle}) { this.$refs.chatCoversitionList.addCoversition(data, headerTitle); + this.isHasCoversition = true; this.currentCoversition = {id:data.id, all:data.all}; this.headerTitle = headerTitle; }, @@ -281,6 +305,15 @@ export default { };