Merge branch 'feature/task1.0.0' into msb_test

merge-requests/81/merge
张征 3 years ago
commit e1cfc41ebb

@ -39,7 +39,8 @@ export default {
categoryId: "", categoryId: "",
order: "", order: "",
}); });
vm.recommendedData = res.result; console.log(res.result)
vm.recommendedData = res.result.records;
}, },
}, },
}; };

@ -46,7 +46,7 @@ export default {
'@plugins/axiosTk.js', '@plugins/axiosTk.js',
'@plugins/vue-inject.js', '@plugins/vue-inject.js',
'@/plugins/v-distpicker', '@/plugins/v-distpicker',
'@/plugins/router', // '@/plugins/router',
'@/plugins/im' '@/plugins/im'
], ],

@ -43,10 +43,10 @@ export default {
return {}; return {};
}, },
computed: { computed: {
...mapState(["token"], ["socketMsgData"]), ...mapState(["token","socketMsgData"]),
}, },
mounted(){ mounted(){
console.log(`socketMsgData`,this.socketMsgData) console.log(`socketMsgData`,this.$store)
}, },
methods: {}, methods: {},
}; };

@ -18,7 +18,7 @@ Vue.prototype.$startWebSockets = function () {
Vue.prototype.Socket.onopen = () => { Vue.prototype.Socket.onopen = () => {
let traceId = guid(); let traceId = guid();
Vue.prototype.Socket.send( Vue.prototype.Socket.send(
`{"traceId":${traceId},traceType:1,"content":{"size": 100}}` `{"traceId":"${traceId}",traceType:1,"content":{"size": 100}}`
); );
}; };
Vue.prototype.Socket.onclose = () => { Vue.prototype.Socket.onclose = () => {
@ -40,7 +40,7 @@ Vue.prototype.$startWebSockets = function () {
if (msg.traceType == 1) { if (msg.traceType == 1) {
let traceId = guid(); let traceId = guid();
let sys = msg.content.sessionVOS.find((item) => item.type != 3); let sys = msg.content.sessionVOS.find((item) => item.type != 3);
let str = `{"traceId":${traceId},traceType:2,"content":{"sessionId":${sys.id}}}`; let str = `{"traceId":"${traceId}",traceType:2,"content":{"sessionId":${sys.id}}}`;
Vue.prototype.Socket.send(str); Vue.prototype.Socket.send(str);
this.$store.commit("setUnreadCount", msg.content.totalUnreadCount); this.$store.commit("setUnreadCount", msg.content.totalUnreadCount);
} }
@ -54,9 +54,13 @@ Vue.prototype.$startWebSockets = function () {
if (msg.traceType == 3) { if (msg.traceType == 3) {
let traceId = guid(); let traceId = guid();
Vue.prototype.Socket.send( Vue.prototype.Socket.send(
`{"traceId":${traceId},traceType:1,"content":{"size": 100}}` `{"traceId":"${traceId}",traceType:1,"content":{"size": 100}}`
); );
} }
setTimeout(()=>{
console.log(this.$store.state)
},500)
}; };
} }
}; };

@ -54,6 +54,7 @@ const mutations = {
}, },
setSocketMsgData(state, val){ setSocketMsgData(state, val){
state.socketMsgData = val; state.socketMsgData = val;
console.log(state.socketMsgData)
} }
}; };
const actions = { const actions = {

Loading…
Cancel
Save