fix:导航栏跳转闪屏优化
This commit is contained in:
parent
3322089431
commit
e99120c34e
|
|
@ -240,6 +240,10 @@ export default {
|
||||||
this.chatList = this.normalizeDialogueList(list);
|
this.chatList = this.normalizeDialogueList(list);
|
||||||
// 同步到全局会话列表,便于后续实时合并
|
// 同步到全局会话列表,便于后续实时合并
|
||||||
this.$store.commit("set_UserMsgList", this.chatList);
|
this.$store.commit("set_UserMsgList", this.chatList);
|
||||||
|
this.$store.commit("upsert_DialogueTypeMap", {
|
||||||
|
list: this.chatList,
|
||||||
|
type: 1,
|
||||||
|
});
|
||||||
this.totalCount = res?.data?.item2 || list.length;
|
this.totalCount = res?.data?.item2 || list.length;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("[在线咨询] 获取会话列表失败", error);
|
console.error("[在线咨询] 获取会话列表失败", error);
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@ const store = new Vuex.Store({
|
||||||
vuex_msgUser: lifeData.vuex_msgUser ? lifeData.vuex_msgUser : {},
|
vuex_msgUser: lifeData.vuex_msgUser ? lifeData.vuex_msgUser : {},
|
||||||
// 消息窗口滚动位置
|
// 消息窗口滚动位置
|
||||||
vuex_msgScrollTop: 0,
|
vuex_msgScrollTop: 0,
|
||||||
|
// 记录会话ID与在线咨询类型的映射,区分在线咨询/人工转接
|
||||||
|
vuex_dialogueTypeMap: {},
|
||||||
// 自定义tabbar数据
|
// 自定义tabbar数据
|
||||||
vuex_iPhone: lifeData.vuex_iPhone ? lifeData.vuex_iPhone : false,
|
vuex_iPhone: lifeData.vuex_iPhone ? lifeData.vuex_iPhone : false,
|
||||||
// tabbar相关配置
|
// tabbar相关配置
|
||||||
|
|
@ -271,6 +273,21 @@ const store = new Vuex.Store({
|
||||||
saveLifeData("vuex_teacherInfo", state.vuex_teacherInfo);
|
saveLifeData("vuex_teacherInfo", state.vuex_teacherInfo);
|
||||||
saveLifeData("vuex_user", state.vuex_user);
|
saveLifeData("vuex_user", state.vuex_user);
|
||||||
},
|
},
|
||||||
|
// 合并会话类型映射(在线咨询类型)
|
||||||
|
upsert_DialogueTypeMap(state, { list = [], type }) {
|
||||||
|
if (!type) return;
|
||||||
|
const next = { ...(state.vuex_dialogueTypeMap || {}) };
|
||||||
|
list.forEach((item) => {
|
||||||
|
const id =
|
||||||
|
item?.dialogueManagementId ||
|
||||||
|
item?.DialogueManagementId ||
|
||||||
|
item?.dialogueId ||
|
||||||
|
item?.friendId ||
|
||||||
|
item?.id;
|
||||||
|
if (id) next[id] = type;
|
||||||
|
});
|
||||||
|
state.vuex_dialogueTypeMap = next;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
// 获取聊天列表(最近联系人)
|
// 获取聊天列表(最近联系人)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue