diff --git a/src/store/modules/trainingNew.js b/src/store/modules/trainingNew.js index 6301a8d56..8f0dec7b1 100644 --- a/src/store/modules/trainingNew.js +++ b/src/store/modules/trainingNew.js @@ -21,7 +21,8 @@ const training = { voiceStepIndex: -1, examSwitch: false, // 考试开始结束标注 stepRecord: [], // 操作记录 - joinTrainingInfo: null + joinTrainingInfo: null, + isRecord: false }, getters: { teachMode: (state) => { @@ -131,6 +132,9 @@ const training = { }, setJoinTrainingInfo: (state, joinTrainingInfo) => { state.joinTrainingInfo = joinTrainingInfo; + }, + setIsRecord: (state, flag) => { + state.isRecord = flag; } }, actions: { @@ -234,6 +238,9 @@ const training = { }, setJoinTrainingInfo: ({ commit }, joinTrainingInfo ) => { commit('setJoinTrainingInfo', joinTrainingInfo); + }, + setIsRecord: ({ commit }, flag) => { + commit('setIsRecord', flag); } } }; diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index 8227cd99c..f3fbccbc0 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -247,7 +247,7 @@ export default { } }, isRecord() { - return !!this.$route.query.record; + return !!this.$store.state.trainingNew.record; } }, watch:{ diff --git a/src/views/newMap/chatView/voiceChatBox.vue b/src/views/newMap/chatView/voiceChatBox.vue index 398ff7461..04663d4c2 100644 --- a/src/views/newMap/chatView/voiceChatBox.vue +++ b/src/views/newMap/chatView/voiceChatBox.vue @@ -31,7 +31,7 @@