优化好友和群聊新建会话逻辑。
This commit is contained in:
8
unpackage/dist/dev/app-plus/app-service.js
vendored
8
unpackage/dist/dev/app-plus/app-service.js
vendored
@@ -149,7 +149,6 @@ if (uni.restoreGlobal) {
|
||||
if (res.statusCode === 200) {
|
||||
const messagesInfo = res.data;
|
||||
if (messagesInfo) {
|
||||
formatAppLog("log", "at utils/cloud-api.js:98", "返回数据为", messagesInfo);
|
||||
formatAppLog("log", "at utils/cloud-api.js:99", "工作区id为:", messagesInfo.workspace_id || "(无)");
|
||||
if (messagesInfo.workspace_id) {
|
||||
uni.setStorageSync("workspace_id", messagesInfo.workspace_id);
|
||||
@@ -2700,7 +2699,10 @@ if (uni.restoreGlobal) {
|
||||
emit("select-chat");
|
||||
};
|
||||
const openNewChatModal = () => {
|
||||
formatAppLog("log", "at components/ChatSidebar.vue:272", "点击了新建会话");
|
||||
if (chatType.value === 1 || chatType.value === 2) {
|
||||
goContactPages();
|
||||
return;
|
||||
}
|
||||
emit("update:showNewChatModal", true);
|
||||
};
|
||||
const goContactPages = () => {
|
||||
@@ -2744,7 +2746,7 @@ if (uni.restoreGlobal) {
|
||||
const UserInfo = await getUserInfo(UserToken.value);
|
||||
UserAvatar.value = UserInfo.avatar || "";
|
||||
UserName.value = UserInfo.username || "";
|
||||
formatAppLog("log", "at components/ChatSidebar.vue:328", "菜单收到的会话列表:", UserConversations.value);
|
||||
formatAppLog("log", "at components/ChatSidebar.vue:333", "菜单收到的会话列表:", UserConversations.value);
|
||||
});
|
||||
const __returned__ = { props, emit, UserConversations, showNewChatModal, chatType, openUserCardVisible, isSelectMode, selectedHistoryIds, deleteConversations, clearAllConversations, isAllHistorySelected, currentChatId, selectChat, openNewChatModal, goContactPages, chatHistoryQuery, isHistorySearchFocused, toggleSelectMode, toggleHistorySelect, toggleSelectAllHistory, UserToken, UserAvatar, UserName, truncateText, computed: vue.computed, onMounted: vue.onMounted, onUnmounted: vue.onUnmounted, ref: vue.ref, toRef: vue.toRef, get deleteConversation() {
|
||||
return deleteConversation;
|
||||
|
||||
Reference in New Issue
Block a user