diff --git a/src/store/modules/user.js b/src/store/modules/user.js index f15370e4b..a4aadd7cf 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -55,16 +55,10 @@ const user = { Cookies.remove('UserToken'); }, SUBSCRIBE: (state, {header, type}) => { - if (type == 'design') { - creatSubscribe(commonTopic, header); - } else { - creatSubscribe(perpetualTopic, header); - creatSubscribe(commonTopic, header); - } + creatSubscribe(perpetualTopic, header); }, SUBSCRIBE_UN: () => { clearSubscribe(perpetualTopic); - clearSubscribe(commonTopic); }, Disconnect: ()=>{ disconnect(); diff --git a/src/utils/stomp.js b/src/utils/stomp.js index f1f0d1a63..09cf86f95 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -4,7 +4,6 @@ import store from '@/store'; export const displayTopic = '/user/queue/simulation'; // 其他仿真topic export const perpetualTopic = '/user/topic/message'; // 公用topic -export const commonTopic = '/topic/message'; // 公共topic(不区分用户) // 建立连接并订阅地址 export function creatSubscribe(topic, header) {