修改订阅问题
This commit is contained in:
parent
307081aee4
commit
fb71e4cbe8
@ -7,7 +7,6 @@
|
||||
|
||||
<script>
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { creatSubscribe, perpetualTopic, commonTopic } from '@/utils/stomp';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { ProjectIcon, loginInfo } from '@/scripts/ConstDic';
|
||||
import DeomonTopic from '@/views/demonstration/deomonTopic';
|
||||
@ -81,8 +80,7 @@ export default {
|
||||
const token = getToken();
|
||||
if (token && this.$route.path != '/404') {
|
||||
const header = { group: '', 'X-Token': token };
|
||||
creatSubscribe(perpetualTopic, header);
|
||||
creatSubscribe(commonTopic, header);
|
||||
this.$store.dispatch('subscribe', {header, type: getSessionStorage('project')});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -167,6 +167,12 @@ const user = {
|
||||
|
||||
SetAccount({ commit }, account) {
|
||||
commit('SET_ACCOUNT', account);
|
||||
},
|
||||
subscribe({commit}, params) {
|
||||
commit('SUBSCRIBE', params);
|
||||
},
|
||||
subscribe_un({commit}, params) {
|
||||
commit('SUBSCRIBE_UN', params);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user