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