Commit d9e8f826 authored by 赵啸非's avatar 赵啸非

修改同步用户

parent 9729d64a
......@@ -94,39 +94,6 @@ export default {
//window.removeEventListener("message", this.getsocketData, false);
},
mounted() {
// console.log("mounted");
// this.$nextTick(function () {
// console.log("login websocket:"+"ws://"+process.env.VUE_APP_WEBSOCKET_API +"/ws?accessToken="+ this.$store.state.userData.id)
// createSocket(
// "ws://" +
// process.env.VUE_APP_WEBSOCKET_API +
// "/ws?accessToken=" +
// this.$store.state.userData.id
// );
// });
// let _this = this;
// const getsocketData = (e) => {i
// // 创建接收消息函数
// const data = e && e.detail.data;
// let obj = JSON.parse(data);
// if (obj.type == "SEND_TO_ALL_REQUEST") {
// vm.refreshData();
// let content = JSON.parse(obj.body.content);
// _this.$notify({
// title: "警告",
// message: content,
// type: "warning",
// duration: 8000,
// });
// }
// };
// this.getsocketData = getsocketData;
// // 注册监听事件
// window.addEventListener("onmessageWS", getsocketData,false);
},
computed: {
......@@ -151,6 +118,7 @@ export default {
return this.userData.flat
},
menu() {
console.log("userData",this.userData)
if(!this.userData.barList) return [];
return this.userData.barList.map(item=>{
const url = item.url ? item.url : (item.childList[0] ? (item.childList[0].url || '') : '');
......
......@@ -39,7 +39,6 @@ const router = new Router({
...restBuilder('task', 'system/task'), // 系统管理--任务管理
...restBuilder('metting/record', 'metting/record'),//会议记录
...restBuilder('gocome/record', 'gocome/record'),//往来记录
...restBuilder('room', 'room'),//房间管理
......
......@@ -38,10 +38,10 @@ export default {
},
loginSuccess({ data }) {
this.$store.commit("setUserData", data);
this.$router.push('/index') // 有token直接跳转首页
// this.$router.replace({
// path: this.redirect,
// });
console.log("userData",this.$store.state.userData)
this.$router.replace({
path: this.redirect,
});
},
loginFail(error) {
this.loading = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment