删除公共topic

This commit is contained in:
fan 2020-01-14 17:14:45 +08:00
parent 9688838869
commit 75334d11fa
2 changed files with 1 additions and 8 deletions

View File

@ -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();

View File

@ -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) {