diff --git a/components/BsLogin.vue b/components/BsLogin.vue index 8bc8b16..ec836f0 100644 --- a/components/BsLogin.vue +++ b/components/BsLogin.vue @@ -64,6 +64,7 @@ import { mapState } from "vuex"; import { Message } from "element-ui"; import { ApiGetCode, ApiPostLogin } from "@/plugins/api/account"; import { IsPhone } from "/plugins/utils"; +import {Im, ImInit} from '@/plugins/chat' const COUNT_DOWN_TIME = 60; // 验证码倒计时 export default { @@ -167,7 +168,12 @@ export default { this.dialogVisible = false; this.$store.commit("setToken", result.token); this.$store.dispatch("getUserInfo"); - this.$startWebSockets() + // this.$startWebSockets() + // 初始化IM + ImInit().then(() => { + // 获取到会话列表 + Im.getSessionList(); + }); } } }); diff --git a/layouts/module/header/HeaderCart.vue b/layouts/module/header/HeaderCart.vue index b148608..d8f1004 100644 --- a/layouts/module/header/HeaderCart.vue +++ b/layouts/module/header/HeaderCart.vue @@ -42,7 +42,7 @@