blue
1 year ago
committed by
Gitee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with
14 additions and
17 deletions
-
im-uniapp/App.vue
-
im-uniapp/components/chat-item/chat-item.vue
-
im-uniapp/pages/chat/chat-box.vue
-
im-uniapp/store/chatStore.js
-
im-web/src/components/chat/ChatMessageItem.vue
-
im-web/src/components/group/AddGroupMember.vue
-
im-web/src/store/chatStore.js
|
|
|
@ -311,6 +311,7 @@ |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
if (!loginInfo || !loginInfo.refreshToken) { |
|
|
|
reject(); |
|
|
|
return; |
|
|
|
} |
|
|
|
http({ |
|
|
|
url: '/refreshToken', |
|
|
|
|
|
|
|
@ -100,6 +100,7 @@ |
|
|
|
position: absolute; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
z-index: 99; |
|
|
|
} |
|
|
|
|
|
|
|
.left { |
|
|
|
|
|
|
|
@ -1,7 +1,6 @@ |
|
|
|
<template> |
|
|
|
<view class="page chat-box"> |
|
|
|
<view class="header"> |
|
|
|
<uni-icons class="btn-side left" type="back" size="30" @click="onNavBack()"></uni-icons> |
|
|
|
<text class="title">{{title}}</text> |
|
|
|
<uni-icons class="btn-side right" type="more-filled" size="30" @click="onShowMore()"></uni-icons> |
|
|
|
</view> |
|
|
|
@ -344,11 +343,6 @@ |
|
|
|
selectEmoji(emoText) { |
|
|
|
this.sendText += `#${emoText};`; |
|
|
|
}, |
|
|
|
onNavBack() { |
|
|
|
uni.switchTab({ |
|
|
|
url: "/pages/chat/chat" |
|
|
|
}) |
|
|
|
}, |
|
|
|
onKeyboardheightchange(e) { |
|
|
|
if (e.detail.height > 0) { |
|
|
|
this.showKeyBoard = true; |
|
|
|
@ -797,10 +791,6 @@ |
|
|
|
font-size: 28rpx; |
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
&.left { |
|
|
|
left: 30rpx; |
|
|
|
} |
|
|
|
|
|
|
|
&.right { |
|
|
|
right: 30rpx; |
|
|
|
} |
|
|
|
|
|
|
|
@ -302,7 +302,7 @@ export default defineStore('chatStore', { |
|
|
|
}); |
|
|
|
// 将消息一次性装载回来
|
|
|
|
this.chats = cacheChats; |
|
|
|
// 清空缓存
|
|
|
|
// 清空缓存,不再使用
|
|
|
|
cacheChats = null; |
|
|
|
this.saveToStorage(); |
|
|
|
}, |
|
|
|
@ -375,7 +375,10 @@ export default defineStore('chatStore', { |
|
|
|
return state.loadingPrivateMsg || state.loadingGroupMsg |
|
|
|
}, |
|
|
|
curChats: (state) => { |
|
|
|
return state.isLoading() ? cacheChats : state.chats; |
|
|
|
if(cacheChats && state.isLoading()){ |
|
|
|
return cacheChats; |
|
|
|
} |
|
|
|
return state.chats; |
|
|
|
}, |
|
|
|
findChatIdx: (state) => (chat) => { |
|
|
|
let chats = state.curChats; |
|
|
|
|
|
|
|
@ -36,7 +36,7 @@ |
|
|
|
<div class="chat-file-box" v-loading="loading"> |
|
|
|
<div class="chat-file-info"> |
|
|
|
<el-link class="chat-file-name" :underline="true" target="_blank" type="primary" |
|
|
|
:href="data.url">{{ data.name }}</el-link> |
|
|
|
:href="data.url" :download="data.name">{{ data.name }}</el-link> |
|
|
|
<div class="chat-file-size">{{ fileSize }}</div> |
|
|
|
</div> |
|
|
|
<div class="chat-file-icon"> |
|
|
|
|
|
|
|
@ -2,8 +2,7 @@ |
|
|
|
<el-dialog title="邀请好友" :visible.sync="visible" width="50%" :before-close="onClose"> |
|
|
|
<div class="agm-container"> |
|
|
|
<div class="agm-l-box"> |
|
|
|
<el-input placeholder="搜索好友" v-model="searchText" |
|
|
|
@keyup.enter.native="onSearch()"> |
|
|
|
<el-input placeholder="搜索好友" v-model="searchText"> |
|
|
|
<i class="el-icon-search el-input__icon" slot="suffix"> </i> |
|
|
|
</el-input> |
|
|
|
<el-scrollbar style="height:400px;"> |
|
|
|
|
|
|
|
@ -289,7 +289,7 @@ export default { |
|
|
|
}); |
|
|
|
// 将消息一次性装载回来
|
|
|
|
state.chats = cacheChats; |
|
|
|
// 清空缓存
|
|
|
|
// 清空缓存,不再使用
|
|
|
|
cacheChats = null; |
|
|
|
this.commit("saveToStorage"); |
|
|
|
}, |
|
|
|
@ -369,7 +369,10 @@ export default { |
|
|
|
return state.loadingPrivateMsg || state.loadingGroupMsg |
|
|
|
}, |
|
|
|
findChats: (state, getters) => () => { |
|
|
|
return getters.isLoading() ? cacheChats : state.chats; |
|
|
|
if(cacheChats && getters.isLoading()){ |
|
|
|
return cacheChats; |
|
|
|
} |
|
|
|
return state.chats; |
|
|
|
}, |
|
|
|
findChatIdx: (state, getters) => (chat) => { |
|
|
|
let chats = getters.findChats(); |
|
|
|
|