后端:
1、事件订阅增加rabbitmq中间件 移动端: 1、完善移动端目录结构和代码框架
This commit is contained in:
@@ -18,4 +18,4 @@ export function useBrowserNotification() {
|
||||
};
|
||||
|
||||
return { requestPermission, send };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
<i style="color: red;line-height:0;" v-html="feather.icons['alert-circle'].toSvg({width:14})"></i>
|
||||
<span>新消息无法通知,点我授予通知权限</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="scroll-area">
|
||||
<div v-for="s in filteredSessions" :key="s.id"
|
||||
<div v-for="s in filteredSessions" :key="s.id"
|
||||
class="list-item" :class="{active: activeId === s.id}" @click="selectSession(s)">
|
||||
<div class="avatar-container">
|
||||
<img :src="s.targetAvatar ?? defaultAvatar" class="avatar-std" />
|
||||
@@ -40,8 +40,7 @@
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ref, computed, nextTick, onMounted } from 'vue'
|
||||
import { messageService } from '@/services/message'
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import defaultAvatar from '@/assets/default_avatar.png'
|
||||
import { formatDate } from '@/utils/formatDate'
|
||||
import { useConversationStore } from '@/stores/conversation'
|
||||
@@ -56,7 +55,6 @@ const browserNotification = useBrowserNotification();
|
||||
|
||||
const searchQuery = ref('')
|
||||
const activeId = ref(1)
|
||||
const conversations = ref([]);
|
||||
const searchUserModal = ref(false);
|
||||
const msgTitleShow = ref(false);
|
||||
const addMenuList = [
|
||||
@@ -92,7 +90,7 @@ function actionHandler(type){
|
||||
case 'addFriend':
|
||||
searchUserModal.value = true;
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -102,10 +100,6 @@ async function requestNotificationPermission(){
|
||||
if(Notification.permission === "granted") msgTitleShow.value = false;
|
||||
}
|
||||
|
||||
async function loadConversation() {
|
||||
const res = await messageService.getConversations();
|
||||
conversations.value = res.data;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await conversationStore.loadUserConversations();
|
||||
@@ -212,8 +206,8 @@ onMounted(async () => {
|
||||
.msg.other { flex-direction: row; }
|
||||
|
||||
/* 本人发的:翻转排列方向,靠右显示 */
|
||||
.msg.mine {
|
||||
flex-direction: row-reverse;
|
||||
.msg.mine {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.msg-content {
|
||||
@@ -316,4 +310,4 @@ textarea {
|
||||
|
||||
.nav-item { font-size: 24px; cursor: pointer; opacity: 0.5; }
|
||||
.nav-item.active { opacity: 1; }
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user