提交 a7da8ebc 编写于 作者: lyf's avatar lyf

修改vux

上级 8756edd3
...@@ -80,6 +80,7 @@ const main = { ...@@ -80,6 +80,7 @@ const main = {
state.showAdvice = obj; state.showAdvice = obj;
}, },
updateNoticeList(state, obj) { updateNoticeList(state, obj) {
console.log(11111);
state.noticeList = obj; state.noticeList = obj;
}, },
updateIsSuperAdmin(state, obj) { updateIsSuperAdmin(state, obj) {
......
...@@ -37,8 +37,9 @@ const socket = { ...@@ -37,8 +37,9 @@ const socket = {
}); });
socketClient.on('diagnose_call_push_event', (socket) => { socketClient.on('diagnose_call_push_event', (socket) => {
console.log('diagnose_call_push_event---', socket); console.log('diagnose_call_push_event---', socket);
console.log('context.state.noticeList',context.state.noticeList)
const l = context.state.noticeList; console.log('context.state.noticeList', window._VM.$store);
const l = window._VM.$store.state.main.noticeList;
if (l.length >= 5) { if (l.length >= 5) {
l.shift(); l.shift();
} }
...@@ -47,15 +48,16 @@ const socket = { ...@@ -47,15 +48,16 @@ const socket = {
context.commit('main/updateNoticeList', l, { root: true }); context.commit('main/updateNoticeList', l, { root: true });
console.log('n--------', n); console.log('n--------', n);
const { path } = window._VM.$route; const { path } = window._VM.$route;
const operateUserId = context.state.soketQuest.operateUserId const operateUserId = window._VM.$store.state.main.soketQuest.operateUserId
? context.state.soketQuest.operateUserId ? window._VM.$store.state.main.soketQuest.operateUserId
: ''; : '';
if ( if (
path && path &&
String(path).indexOf('workbench') > -1 && String(path).indexOf('workbench') > -1 &&
n.operateUserId == operateUserId n.operateUserId == operateUserId
) { ) {
context.commit('socket/SET_NOTIFY', context, n, { root: true }); console.log(11111)
context.commit('SET_NOTIFY', n);
} }
}); });
socketClient.on('ping', function () { socketClient.on('ping', function () {
...@@ -85,7 +87,7 @@ const socket = { ...@@ -85,7 +87,7 @@ const socket = {
window.socketClient = payload; window.socketClient = payload;
state.socketClient = payload; state.socketClient = payload;
}, },
SET_NOTIFY: (state, context, payload) => { SET_NOTIFY: (state, payload) => {
console.log('--payload', payload); console.log('--payload', payload);
const doms = document.getElementsByClassName('el-notification'); const doms = document.getElementsByClassName('el-notification');
if (doms.length >= 5) return; if (doms.length >= 5) return;
...@@ -119,7 +121,7 @@ const socket = { ...@@ -119,7 +121,7 @@ const socket = {
}); });
return false; return false;
} }
context.dispatch('gotoInquiry', payload); window._VM.$store.dispatch('main/gotoInquiry', payload);
cn.close(); cn.close();
}, },
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册