mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 00:45:54 +08:00
feat: ✨ 优化im 接口403判定,新增从买家端以及卖家端进行跳转im权限判定,新增im掉线重连以及重连成功提醒,新增发送的消息断线将会进行重新发送消息提示,优化最近浏览 订单列表空展示。注释部分im打印的日志信息
This commit is contained in:
@@ -21,11 +21,15 @@ export default {
|
||||
float: "",
|
||||
},
|
||||
],
|
||||
|
||||
webSocketWithOut:false, // ws 是否是掉线 无输出状态
|
||||
// 对话索引(聊天对话的唯一索引)
|
||||
index_name: null,
|
||||
},
|
||||
mutations: {
|
||||
// 设置ws状态
|
||||
SET_WS_STATUS: (state,resource) =>{
|
||||
state.webSocketWithOut = resource
|
||||
},
|
||||
// 更新对话
|
||||
UPDATE_DIALOGUE_MESSAGE (state, resource) {
|
||||
state.records = [];
|
||||
@@ -56,6 +60,8 @@ export default {
|
||||
|
||||
// 推送对话记录
|
||||
PUSH_DIALOGUE (state, record) {
|
||||
record = {...record,webSocketStatus:state.webSocketWithOut}
|
||||
console.log("推送对话",)
|
||||
state.records.push(record);
|
||||
},
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ const Talk = {
|
||||
talkNum: (state) => state.items.length,
|
||||
},
|
||||
mutations: {
|
||||
|
||||
// 设置对话列表
|
||||
SET_TALK_ITEMS (state, resource) {
|
||||
Vue.set(state, 'items', resource.items)
|
||||
|
||||
@@ -19,7 +19,6 @@ let state = {
|
||||
// 判断用户是否登录
|
||||
if (getToken()) {
|
||||
let userInfo = getUserInfo();
|
||||
console.error(userInfo)
|
||||
state.name = userInfo.name;
|
||||
state.id = userInfo.id;
|
||||
state.face = userInfo.face ? userInfo.face : state.avatar;
|
||||
|
||||
@@ -4,8 +4,6 @@ const defaultAvatar = require('@/assets/image/detault-avatar.jpg')
|
||||
const state = {
|
||||
socketStatus: false,
|
||||
website_name: process.env.VUE_APP_WEBSITE_NAME,
|
||||
copyright: `©2020 - 2021 ${process.env.VUE_APP_WEBSITE_NAME} 在线聊天 <a href="https://github.com/gzydong/LumenIM" style="color: #777272;font-weight: 400;" target="_blank">Github源码</a>`,
|
||||
|
||||
// 头像加载失败后的默认头像
|
||||
defaultAvatar: "this.src='" + defaultAvatar + "'",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user