需新增:添加好友页面,优化各模块页面

This commit is contained in:
cbb
2026-01-22 17:04:43 +08:00
parent 57fec30165
commit 571e91b01c
17 changed files with 223 additions and 87 deletions

View File

@@ -1,6 +1,8 @@
<template>
<div :ref="convHeaderRef" class="tui-conversation-header">
<Navigation title="消息">
<Navigation
:title="`消息${props.topCount ? `(${props.topCount})` : ''}`"
>
<template #right>
<div v-show="!isGlobalSearching" class="menu-container">
<ul v-if="menuList.length > 0" class="list">
@@ -60,6 +62,16 @@
import Server, { IMenuItem } from './server'
import type { ISearchingStatus } from '../../TUISearch/type'
import { navigateTo } from '../../../../utils/router'
import { useUI } from '../../../../utils/use-ui'
const { showDialog } = useUI()
const props = defineProps({
topCount: {
type: String,
default: ''
}
})
const showChildren = ref<IMenuItem[]>([])
const convHeaderRef = ref<HTMLElement | undefined>()
@@ -96,7 +108,18 @@
listener = { onClicked: () => {} }
} = item
if (children) {
let listData = children
const addUserItem = {
data: { name: 'isAddUser' },
icon: '/TUIKit/assets/icon/user-add.svg',
text: '添加好友',
listener: {
onClicked: () => {}
}
}
let listData = [
addUserItem,
...children.filter(c => c.data.name !== 'isC2C')
]
// #ifdef APP-PLUS
// 扫一扫
@@ -110,9 +133,11 @@
}
listData = [scanItem, ...listData]
// #endif
showChildren.value = showChildren.value.length > 0 ? [] : listData
} else {
if (item.data.name === 'isScan') {
// 扫一扫
uni.scanCode({
onlyFromCamera: false,
scanType: ['qrCode'],
@@ -120,6 +145,9 @@
navigateTo(res.result)
}
})
} else if (item.data.name === 'isAddUser') {
console.log('添加好友')
showDialog('提示', '开发中...')
} else {
listener.onClicked(item)
}