Compare commits
7 Commits
4a670201c6
...
fe857f1e81
Author | SHA1 | Date | |
---|---|---|---|
|
fe857f1e81 | ||
a06f0b2489 | |||
84cca43b52 | |||
|
b771a3c910 | ||
c2a9676b09 | |||
7595af1d33 | |||
d781a94a89 |
2
components.d.ts
vendored
2
components.d.ts
vendored
@ -37,6 +37,8 @@ declare module 'vue' {
|
|||||||
SysGroupAdminMessage: typeof import('./src/components/talk/message/system/SysGroupAdminMessage.vue')['default']
|
SysGroupAdminMessage: typeof import('./src/components/talk/message/system/SysGroupAdminMessage.vue')['default']
|
||||||
SysGroupCancelMutedMessage: typeof import('./src/components/talk/message/system/SysGroupCancelMutedMessage.vue')['default']
|
SysGroupCancelMutedMessage: typeof import('./src/components/talk/message/system/SysGroupCancelMutedMessage.vue')['default']
|
||||||
SysGroupCreateMessage: typeof import('./src/components/talk/message/system/SysGroupCreateMessage.vue')['default']
|
SysGroupCreateMessage: typeof import('./src/components/talk/message/system/SysGroupCreateMessage.vue')['default']
|
||||||
|
SysGroupInfoChange: typeof import('./src/components/talk/message/system/SysGroupInfoChange.vue')['default']
|
||||||
|
SysGroupInfoChangeMessage: typeof import('./src/components/talk/message/system/SysGroupInfoChangeMessage.vue')['default']
|
||||||
SysGroupJoinMessage: typeof import('./src/components/talk/message/system/SysGroupJoinMessage.vue')['default']
|
SysGroupJoinMessage: typeof import('./src/components/talk/message/system/SysGroupJoinMessage.vue')['default']
|
||||||
SysGroupMemberCancelMutedMessage: typeof import('./src/components/talk/message/system/SysGroupMemberCancelMutedMessage.vue')['default']
|
SysGroupMemberCancelMutedMessage: typeof import('./src/components/talk/message/system/SysGroupMemberCancelMutedMessage.vue')['default']
|
||||||
SysGroupMemberKickedMessage: typeof import('./src/components/talk/message/system/SysGroupMemberKickedMessage.vue')['default']
|
SysGroupMemberKickedMessage: typeof import('./src/components/talk/message/system/SysGroupMemberKickedMessage.vue')['default']
|
||||||
|
@ -66,7 +66,6 @@ defineProps({
|
|||||||
<span v-if="talk_type === 2 && login_uid !== revokeInfo.withdraw_id && login_uid === revokeInfo.retracted_id && revokeInfo.withdraw_id !== revokeInfo.retracted_id">
|
<span v-if="talk_type === 2 && login_uid !== revokeInfo.withdraw_id && login_uid === revokeInfo.retracted_id && revokeInfo.withdraw_id !== revokeInfo.retracted_id">
|
||||||
{{revokeInfo.withdraw_name}}撤回了你一条消息 |
|
{{revokeInfo.withdraw_name}}撤回了你一条消息 |
|
||||||
{{ formatTime(datetime) }}
|
{{ formatTime(datetime) }}
|
||||||
{{extra}}
|
|
||||||
</span>
|
</span>
|
||||||
<span v-if="talk_type === 2 && login_uid !== revokeInfo.withdraw_id && login_uid !== revokeInfo.retracted_id && revokeInfo.withdraw_id !== revokeInfo.retracted_id">
|
<span v-if="talk_type === 2 && login_uid !== revokeInfo.withdraw_id && login_uid !== revokeInfo.retracted_id && revokeInfo.withdraw_id !== revokeInfo.retracted_id">
|
||||||
{{revokeInfo.withdraw_name}}撤回了{{revokeInfo.retracted_name}}一条消息 |
|
{{revokeInfo.withdraw_name}}撤回了{{revokeInfo.retracted_name}}一条消息 |
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import { textReplaceEmoji } from '@/utils/emojis'
|
import { textReplaceEmoji } from '@/utils/emojis'
|
||||||
import { textReplaceLink, textReplaceMention } from '@/utils/strings'
|
import { textReplaceLink, textReplaceMention } from '@/utils/strings'
|
||||||
import { ITalkRecordExtraText, ITalkRecord } from '@/types/chat'
|
import { ITalkRecordExtraText, ITalkRecord } from '@/types/chat'
|
||||||
|
import { computed } from 'vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
extra: ITalkRecordExtraText
|
extra: ITalkRecordExtraText
|
||||||
@ -12,15 +13,14 @@ const props = defineProps<{
|
|||||||
|
|
||||||
const float = props.data.float
|
const float = props.data.float
|
||||||
|
|
||||||
let textContent = props.extra?.content || ''
|
const textContent = computed(() => {
|
||||||
|
let text = props.extra?.content || ''
|
||||||
textContent = textReplaceLink(textContent)
|
text = textReplaceLink(text)
|
||||||
|
if (props.data.talk_type == 2) {
|
||||||
if (props.data.talk_type == 2) {
|
text = textReplaceMention(text, '#1890ff')
|
||||||
textContent = textReplaceMention(textContent, '#1890ff')
|
}
|
||||||
}
|
return textReplaceEmoji(text)
|
||||||
|
})
|
||||||
textContent = textReplaceEmoji(textContent)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
<script setup>
|
||||||
|
import './sys-message.less'
|
||||||
|
import { useInject } from '@/hooks'
|
||||||
|
|
||||||
|
const { showUserInfoModal } = useInject()
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
extra: Object,
|
||||||
|
data: Object
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="im-message-sys-text">
|
||||||
|
<div class="sys-text">
|
||||||
|
<a @click="showUserInfoModal(data.user_id)">
|
||||||
|
{{ data.nickname }}
|
||||||
|
</a>
|
||||||
|
<span>修改群名为</span>
|
||||||
|
<span>"{{ extra.group_name }}"</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
@ -17,7 +17,7 @@ export const ChatMsgSysText = 1000 // 系统文本消息
|
|||||||
export const ChatMsgSysGroupCreate = 1101 // 创建群聊消息
|
export const ChatMsgSysGroupCreate = 1101 // 创建群聊消息
|
||||||
export const ChatMsgSysGroupMemberJoin = 1102 // 加入群聊消息
|
export const ChatMsgSysGroupMemberJoin = 1102 // 加入群聊消息
|
||||||
export const ChatMsgSysGroupMemberQuit = 1103 // 群成员退出群消息
|
export const ChatMsgSysGroupMemberQuit = 1103 // 群成员退出群消息
|
||||||
export const ChatMsgSysGroupMemberKicked = 1104 // 移出群成员消息
|
export const ChatMsgSysGroupMemberKicked = 1104 // 移出群成员消息(普通群、项目群被踢)
|
||||||
export const ChatMsgSysGroupMessageRevoke = 1105 // 管理员撤回成员消息
|
export const ChatMsgSysGroupMessageRevoke = 1105 // 管理员撤回成员消息
|
||||||
export const ChatMsgSysGroupDismissed = 1106 // 群解散
|
export const ChatMsgSysGroupDismissed = 1106 // 群解散
|
||||||
export const ChatMsgSysGroupMuted = 1107 // 群禁言
|
export const ChatMsgSysGroupMuted = 1107 // 群禁言
|
||||||
@ -27,6 +27,8 @@ export const ChatMsgSysGroupMemberCancelMuted = 1110 // 群成员解除禁言
|
|||||||
export const ChatMsgSysGroupNotice = 1111 // 编辑群公告
|
export const ChatMsgSysGroupNotice = 1111 // 编辑群公告
|
||||||
export const ChatMsgSysGroupTransfer = 1113 // 变更群主
|
export const ChatMsgSysGroupTransfer = 1113 // 变更群主
|
||||||
export const ChatMsgSysGroupAdmin = 1114 // 设置管理员
|
export const ChatMsgSysGroupAdmin = 1114 // 设置管理员
|
||||||
|
export const ChatMsgSysGroupMemberRemoved = 1115 // 移出群成员消息(部门群、公司群自动移出)
|
||||||
|
export const ChatMsgSysGroupInfoChange = 1116 // 管理员更新了群信息
|
||||||
|
|
||||||
export const ChatMsgTypeMapping = {
|
export const ChatMsgTypeMapping = {
|
||||||
[ChatMsgTypeText]: '[文本消息]',
|
[ChatMsgTypeText]: '[文本消息]',
|
||||||
@ -56,7 +58,9 @@ export const ChatMsgTypeMapping = {
|
|||||||
[ChatMsgSysGroupMemberCancelMuted]: '[群成员解除禁言消息]',
|
[ChatMsgSysGroupMemberCancelMuted]: '[群成员解除禁言消息]',
|
||||||
[ChatMsgSysGroupNotice]: '[群公告]',
|
[ChatMsgSysGroupNotice]: '[群公告]',
|
||||||
[ChatMsgSysGroupTransfer]: '[转让群主]',
|
[ChatMsgSysGroupTransfer]: '[转让群主]',
|
||||||
[ChatMsgSysGroupAdmin]: '[设置管理员]'
|
[ChatMsgSysGroupAdmin]: '[设置管理员]',
|
||||||
|
[ChatMsgSysGroupMemberRemoved]: '[移出群成员消息]',
|
||||||
|
[ChatMsgSysGroupInfoChange]: '[修改群名称]'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 消息类型 - 消息组件 映射关系
|
// 消息类型 - 消息组件 映射关系
|
||||||
@ -87,7 +91,9 @@ export const MessageComponents = {
|
|||||||
[ChatMsgSysGroupMemberMuted]: 'sys-group-member-muted-message',
|
[ChatMsgSysGroupMemberMuted]: 'sys-group-member-muted-message',
|
||||||
[ChatMsgSysGroupMemberCancelMuted]: 'sys-group-member-cancel-muted-message',
|
[ChatMsgSysGroupMemberCancelMuted]: 'sys-group-member-cancel-muted-message',
|
||||||
[ChatMsgSysGroupTransfer]: 'sys-group-transfer-message',
|
[ChatMsgSysGroupTransfer]: 'sys-group-transfer-message',
|
||||||
[ChatMsgSysGroupAdmin]:'sys-group-admin-message'
|
[ChatMsgSysGroupAdmin]:'sys-group-admin-message',
|
||||||
|
[ChatMsgSysGroupMemberRemoved]:'sys-group-member-removed-message',
|
||||||
|
[ChatMsgSysGroupInfoChange]:'sys-group-info-change-message'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 可转发的消息类型
|
// 可转发的消息类型
|
||||||
|
@ -6,7 +6,7 @@ import * as message from '@/constant/message'
|
|||||||
import { formatTalkItem, palyMusic, formatTalkRecord } from '@/utils/talk'
|
import { formatTalkItem, palyMusic, formatTalkRecord } from '@/utils/talk'
|
||||||
// import { isElectronMode } from '@/utils/common'
|
// import { isElectronMode } from '@/utils/common'
|
||||||
import { ServeClearTalkUnreadNum, ServeCreateTalkList } from '@/api/chat/index.js'
|
import { ServeClearTalkUnreadNum, ServeCreateTalkList } from '@/api/chat/index.js'
|
||||||
import { useTalkStore, useDialogueStore,useDialogueListStore } from '@/store'
|
import { useTalkStore, useDialogueStore,useDialogueListStore,useGroupStore } from '@/store'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 好友状态事件
|
* 好友状态事件
|
||||||
@ -178,9 +178,27 @@ class Talk extends Base {
|
|||||||
let newRecord = formatTalkRecord(this.getAccountId(), this.resource);
|
let newRecord = formatTalkRecord(this.getAccountId(), this.resource);
|
||||||
const {addDialogueRecord,addChatRecord} = useDialogueListStore()
|
const {addDialogueRecord,addChatRecord} = useDialogueListStore()
|
||||||
// 群成员变化的消息,需要更新群成员列表
|
// 群成员变化的消息,需要更新群成员列表
|
||||||
if ([1102, 1103, 1104].includes(record.msg_type)) {
|
if ([1102, 1103, 1104, 1115].includes(record.msg_type)) {
|
||||||
useDialogueStore().updateGroupMembers()
|
useDialogueStore().updateGroupMembers()
|
||||||
}
|
}
|
||||||
|
if ([1116].includes(record.msg_type)) {
|
||||||
|
// 更新会话信息
|
||||||
|
useDialogueStore().setDialogue({
|
||||||
|
name: record.extra.group_name,
|
||||||
|
talk_type: record.talk_type,
|
||||||
|
receiver_id: record.receiver_id,
|
||||||
|
})
|
||||||
|
// 更新群聊信息
|
||||||
|
useGroupStore().updateGroupInfo({
|
||||||
|
group_name: record.extra.group_name,
|
||||||
|
avatar: record.extra.group_avatar,
|
||||||
|
})
|
||||||
|
// 更新会话列表中的会话信息
|
||||||
|
const dialogue = useDialogueListStore().getDialogueList(`${record.talk_type}_${record.receiver_id}`)
|
||||||
|
if (dialogue) {
|
||||||
|
dialogue.talk.username = record.extra.group_name
|
||||||
|
}
|
||||||
|
}
|
||||||
addDialogueRecord([newRecord],'add')
|
addDialogueRecord([newRecord],'add')
|
||||||
addChatRecord(this.getIndexName(),newRecord)
|
addChatRecord(this.getIndexName(),newRecord)
|
||||||
useDialogueStore().addDialogueRecord(newRecord)
|
useDialogueStore().addDialogueRecord(newRecord)
|
||||||
@ -233,6 +251,14 @@ class Talk extends Base {
|
|||||||
msg_text: this.getTalkText(),
|
msg_text: this.getTalkText(),
|
||||||
updated_at: parseTime(new Date())
|
updated_at: parseTime(new Date())
|
||||||
})
|
})
|
||||||
|
if(this.resource.msg_type == 1116){
|
||||||
|
// 更新会话列表中的会话信息
|
||||||
|
const dialogue = useDialogueListStore().getDialogueList(`${this.resource.talk_type}_${this.resource.receiver_id}`)
|
||||||
|
if (dialogue) {
|
||||||
|
dialogue.talk.username = this.resource.extra.group_name
|
||||||
|
}
|
||||||
|
useTalkStore().loadTalkList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,6 +178,14 @@
|
|||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/chatSettings/groupManage/manageGroupDeps",
|
||||||
|
"type": "page",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
alphabetItem?.memberList?.length > 0 &&
|
alphabetItem?.memberList?.length > 0 &&
|
||||||
alphabetItem?.key !== '0'
|
alphabetItem?.key !== '0'
|
||||||
"
|
"
|
||||||
:id="alphabetItem.key"
|
:id="alphabetItem.key === '#' ? 'special-hash' : alphabetItem.key"
|
||||||
:ref="
|
:ref="
|
||||||
(el) => {
|
(el) => {
|
||||||
if (el) alphabetElementRefs[alphabetIndex] = el
|
if (el) alphabetElementRefs[alphabetIndex] = el
|
||||||
@ -418,16 +418,47 @@ const assembleAlphabetMemberList = async (newMemberList) => {
|
|||||||
String.fromCharCode(i + 65),
|
String.fromCharCode(i + 65),
|
||||||
)
|
)
|
||||||
let tempAlphabet = []
|
let tempAlphabet = []
|
||||||
|
|
||||||
|
// 创建一个对象来存储所有分组的数据
|
||||||
|
let groupedData = {
|
||||||
|
'#': []
|
||||||
|
}
|
||||||
|
alphabet.forEach(letter => {
|
||||||
|
groupedData[letter] = []
|
||||||
|
})
|
||||||
|
|
||||||
|
// 对数据进行分组
|
||||||
|
if (newMemberList) {
|
||||||
|
newMemberList.forEach(item => {
|
||||||
|
const key = item.key?.toUpperCase()
|
||||||
|
if (alphabet.includes(key)) {
|
||||||
|
groupedData[key].push(item)
|
||||||
|
} else {
|
||||||
|
groupedData['#'].push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将分组数据转换为最终格式
|
||||||
alphabet.forEach((letter) => {
|
alphabet.forEach((letter) => {
|
||||||
const matchedItems = newMemberList.filter((item) => item.key === letter)
|
if (groupedData[letter].length > 0) {
|
||||||
if (matchedItems.length > 0) {
|
|
||||||
tempAlphabet.push(letter)
|
tempAlphabet.push(letter)
|
||||||
}
|
}
|
||||||
resultMemberList.value.push({
|
resultMemberList.value.push({
|
||||||
key: letter,
|
key: letter,
|
||||||
memberList: matchedItems.length ? matchedItems : [],
|
memberList: groupedData[letter],
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 添加#分组(如果有数据)
|
||||||
|
if (groupedData['#'].length > 0) {
|
||||||
|
tempAlphabet.push('#')
|
||||||
|
resultMemberList.value.push({
|
||||||
|
key: '#',
|
||||||
|
memberList: groupedData['#'],
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
state.alphabet = tempAlphabet
|
state.alphabet = tempAlphabet
|
||||||
if (props?.manageType === 'mention' && !props?.isMulSelect) {
|
if (props?.manageType === 'mention' && !props?.isMulSelect) {
|
||||||
resultMemberList.value.unshift({
|
resultMemberList.value.unshift({
|
||||||
@ -544,15 +575,17 @@ const getPosiByDep = async (departmentIdsArr) => {
|
|||||||
const scrollToView = (alphabet) => {
|
const scrollToView = (alphabet) => {
|
||||||
state.currentAlphabet = alphabet
|
state.currentAlphabet = alphabet
|
||||||
state.isAssign = true
|
state.isAssign = true
|
||||||
console.log()
|
|
||||||
zPaging.value?.scrollIntoViewById(
|
// 计算偏移高度
|
||||||
alphabet,
|
const offsetHeight = document.getElementById('topArea')?.clientHeight
|
||||||
document.getElementById('topArea')?.clientHeight
|
? document.getElementById('topArea').clientHeight - 1
|
||||||
? document.getElementById('topArea').clientHeight - 1
|
: props?.manageType === 'mention'
|
||||||
: props?.manageType === 'mention'
|
? 140
|
||||||
? 140
|
: 80
|
||||||
: 80,
|
|
||||||
)
|
// 使用scrollIntoViewById处理所有情况
|
||||||
|
const targetId = alphabet === '#' ? 'special-hash' : alphabet
|
||||||
|
zPaging.value?.scrollIntoViewById(targetId, offsetHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
//监听列表滚动
|
//监听列表滚动
|
||||||
@ -754,3 +787,4 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
props?.item?.hasPointer &&
|
props?.item?.hasPointer &&
|
||||||
(props?.isManager ||
|
(props?.isManager ||
|
||||||
(!props?.isManager &&
|
(!props?.isManager &&
|
||||||
props?.item?.label !== $t('chat.settings.groupName')))
|
(props?.item?.label !== $t('chat.settings.groupName') ||
|
||||||
|
props?.item?.label !== $t('chat.settings.groupType'))))
|
||||||
"
|
"
|
||||||
src="/src/static/image/chatSettings/pointer.png"
|
src="/src/static/image/chatSettings/pointer.png"
|
||||||
/>
|
/>
|
||||||
|
76
src/pages/chatSettings/groupManage/manageGroupDeps.vue
Normal file
76
src/pages/chatSettings/groupManage/manageGroupDeps.vue
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<template>
|
||||||
|
<div class="outer-layer manage-group-deps-page">
|
||||||
|
<div class="root">
|
||||||
|
<ZPaging
|
||||||
|
ref="zPaging"
|
||||||
|
:show-scrollbar="false"
|
||||||
|
:use-virtual-list="true"
|
||||||
|
:virtual-list-col="5"
|
||||||
|
:auto="false"
|
||||||
|
:refresher-enabled="false"
|
||||||
|
:loading-more-enabled="false"
|
||||||
|
>
|
||||||
|
<template #top>
|
||||||
|
<customNavbar :title="$t('pageTitle.view.deps')"></customNavbar>
|
||||||
|
</template>
|
||||||
|
<div class="group-deps-list">
|
||||||
|
<div
|
||||||
|
class="group-deps-list-each"
|
||||||
|
v-for="item in groupParams.groupInfo.deptInfos"
|
||||||
|
:key="item.dept_id"
|
||||||
|
>
|
||||||
|
<span>{{ item.dept_name }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ZPaging>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import settingFormItem from '../components/settingFormItem.vue'
|
||||||
|
import ZPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
import { computed, onMounted, reactive } from 'vue'
|
||||||
|
|
||||||
|
import { useGroupStore } from '@/store'
|
||||||
|
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const groupStore = useGroupStore()
|
||||||
|
const groupParams = reactive({
|
||||||
|
groupInfo: computed(() => groupStore.groupInfo),
|
||||||
|
})
|
||||||
|
|
||||||
|
const state = reactive({})
|
||||||
|
|
||||||
|
onLoad((options) => {
|
||||||
|
console.log(options)
|
||||||
|
})
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
console.log(groupParams.groupInfo.deptInfos)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.outer-layer {
|
||||||
|
flex: 1;
|
||||||
|
background-image: url('@/static/image/clockIn/z3280@3x.png');
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
.group-deps-list {
|
||||||
|
margin: 20rpx 32rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
.group-deps-list-each {
|
||||||
|
padding: 34rpx 32rpx;
|
||||||
|
border-bottom: 1px solid $theme-border-color;
|
||||||
|
span {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -383,7 +383,7 @@ const updateGroupInfos = () => {
|
|||||||
state.chatGroupInfos = [
|
state.chatGroupInfos = [
|
||||||
{
|
{
|
||||||
label: t('chat.settings.groupName'),
|
label: t('chat.settings.groupName'),
|
||||||
hasPointer: true,
|
hasPointer: groupParams?.groupInfo?.is_manager ? true : false,
|
||||||
value: groupName.value,
|
value: groupName.value,
|
||||||
subValue: '',
|
subValue: '',
|
||||||
customInfo: '',
|
customInfo: '',
|
||||||
@ -397,7 +397,7 @@ const updateGroupInfos = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('chat.settings.groupType'),
|
label: t('chat.settings.groupType'),
|
||||||
hasPointer: false,
|
hasPointer: groupParams?.groupInfo?.group_type === 2 ? true : false,
|
||||||
value: groupType.value + '群',
|
value: groupType.value + '群',
|
||||||
subValue: '',
|
subValue: '',
|
||||||
customInfo: '',
|
customInfo: '',
|
||||||
@ -463,6 +463,10 @@ const toManagePage = (label) => {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/chatSettings/groupManage/manageNotice?is_manager=${groupParams?.groupInfo?.is_manager}`,
|
url: `/pages/chatSettings/groupManage/manageNotice?is_manager=${groupParams?.groupInfo?.is_manager}`,
|
||||||
})
|
})
|
||||||
|
} else if (label === t('chat.settings.groupType')) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/chatSettings/groupManage/manageGroupDeps`,
|
||||||
|
})
|
||||||
} else if (label === t('chat.settings.groupMember')) {
|
} else if (label === t('chat.settings.groupMember')) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
|
@ -108,6 +108,8 @@ const photoActionsSelect = (index) => {
|
|||||||
} else {
|
} else {
|
||||||
uni.chooseVideo({
|
uni.chooseVideo({
|
||||||
sourceType: ['album'],
|
sourceType: ['album'],
|
||||||
|
compressed: true,
|
||||||
|
maxDuration: 60,
|
||||||
success: async (res) => {
|
success: async (res) => {
|
||||||
console.log(res, 'res')
|
console.log(res, 'res')
|
||||||
let data = await onUploadImageVideo(
|
let data = await onUploadImageVideo(
|
||||||
|
@ -94,7 +94,7 @@
|
|||||||
v-else
|
v-else
|
||||||
class="message-box record-box"
|
class="message-box record-box"
|
||||||
:class="{
|
:class="{
|
||||||
'direction-rt': item.float == 'right',
|
'direction-rt': item.user_id === talkParams.uid,
|
||||||
'multi-select': dialogueStore.isOpenMultiSelect,
|
'multi-select': dialogueStore.isOpenMultiSelect,
|
||||||
'multi-select-check': item.isCheck,
|
'multi-select-check': item.isCheck,
|
||||||
}"
|
}"
|
||||||
@ -115,7 +115,12 @@
|
|||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<!-- 头像信息 -->
|
<!-- 头像信息 -->
|
||||||
<aside class="avatar-column" @click="toUserDetailPage(item)">
|
<aside
|
||||||
|
class="avatar-column"
|
||||||
|
@click="toUserDetailPage(item)"
|
||||||
|
@touchstart="() => handleAvatarTouchStart(item)"
|
||||||
|
@touchend="handleAvatarTouchEnd"
|
||||||
|
>
|
||||||
<im-avatar
|
<im-avatar
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:src="item.avatar"
|
:src="item.avatar"
|
||||||
@ -130,9 +135,11 @@
|
|||||||
<div class="talk-title">
|
<div class="talk-title">
|
||||||
<span
|
<span
|
||||||
class="nickname pointer"
|
class="nickname pointer"
|
||||||
v-show="talkParams.type == 2 && item.float == 'left'"
|
v-show="
|
||||||
|
talkParams.type == 2 && item.user_id !== talkParams.uid
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<span class="at">@</span>
|
<!-- <span class="at">@</span> -->
|
||||||
{{ item.nickname }}
|
{{ item.nickname }}
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
@ -187,17 +194,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="load-toolbar pointer" style="transform: scaleY(-1);">
|
<div class="load-toolbar pointer" style="transform: scaleY(-1);">
|
||||||
<span v-if="loadConfig.status == 0">正在加载数据中 ...</span>
|
<span v-if="loadConfig.status == 0">正在加载数据中 ...</span>
|
||||||
<span v-else-if="loadConfig.status == 1" @click="onScrollToLower">
|
<span v-if="loadConfig.status == 1" @click="onScrollToLower">
|
||||||
查看更多消息 ...
|
查看更多消息 ...
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span v-if="loadConfig.status == 2" class="no-more">
|
||||||
v-else-if="
|
|
||||||
loadConfig.status != 0 &&
|
|
||||||
loadConfig.status != 1 &&
|
|
||||||
state.localPageLoadDone
|
|
||||||
"
|
|
||||||
class="no-more"
|
|
||||||
>
|
|
||||||
没有更多消息了
|
没有更多消息了
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -1109,6 +1109,9 @@ watch(
|
|||||||
) {
|
) {
|
||||||
//相同意味着分页加载缓存中的聊天记录完毕
|
//相同意味着分页加载缓存中的聊天记录完毕
|
||||||
state.value.localPageLoadDone = true
|
state.value.localPageLoadDone = true
|
||||||
|
if (dialogueList?.records?.[0]?.sequence !== 1) {
|
||||||
|
loadConfig.status = 1
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
state.value.localPageLoadDone = false
|
state.value.localPageLoadDone = false
|
||||||
}
|
}
|
||||||
@ -1220,9 +1223,9 @@ const onScrollToUpper = async () => {
|
|||||||
virtualList.value = tempVirtualList
|
virtualList.value = tempVirtualList
|
||||||
.concat(
|
.concat(
|
||||||
dialogueList.records.slice(
|
dialogueList.records.slice(
|
||||||
Math.min(recordIndex + 11, dialogueList.records.length),
|
recordIndex + 1,
|
||||||
dialogueList.records.length,
|
Math.min(recordIndex + 11, dialogueList.records.length)
|
||||||
),
|
)
|
||||||
)
|
)
|
||||||
.reverse()
|
.reverse()
|
||||||
|
|
||||||
@ -1357,7 +1360,7 @@ const updateMentionUserIds = () => {
|
|||||||
const currentMentions = new Set()
|
const currentMentions = new Set()
|
||||||
|
|
||||||
// 收集当前所有@的用户ID,并转换为number类型
|
// 收集当前所有@的用户ID,并转换为number类型
|
||||||
ops.forEach(op => {
|
ops.forEach((op) => {
|
||||||
if (op.insert && op.insert.mention) {
|
if (op.insert && op.insert.mention) {
|
||||||
currentMentions.add(Number(op.insert.mention.id))
|
currentMentions.add(Number(op.insert.mention.id))
|
||||||
}
|
}
|
||||||
@ -1509,6 +1512,35 @@ const isLeader = computed(() => {
|
|||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//长按头像@用户
|
||||||
|
const doMentionUser = (mentionSelect) => {
|
||||||
|
console.log(mentionSelect)
|
||||||
|
// 构造正确的 mention 对象
|
||||||
|
const mentionObj = {
|
||||||
|
id: mentionSelect.user_id, // 使用 user_id 而不是 erp_user_id
|
||||||
|
nickname: mentionSelect.nickname,
|
||||||
|
}
|
||||||
|
getMentionSelectLists([mentionObj])
|
||||||
|
}
|
||||||
|
|
||||||
|
let avatarPressTimer = null
|
||||||
|
let currentPressItem = null
|
||||||
|
|
||||||
|
const handleAvatarTouchStart = (item) => {
|
||||||
|
currentPressItem = item
|
||||||
|
avatarPressTimer = setTimeout(() => {
|
||||||
|
doMentionUser(item)
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAvatarTouchEnd = () => {
|
||||||
|
if (avatarPressTimer) {
|
||||||
|
clearTimeout(avatarPressTimer)
|
||||||
|
avatarPressTimer = null
|
||||||
|
}
|
||||||
|
currentPressItem = null
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (typeof plus !== 'undefined') {
|
if (typeof plus !== 'undefined') {
|
||||||
const webview = plus.webview.currentWebview()
|
const webview = plus.webview.currentWebview()
|
||||||
@ -1550,6 +1582,9 @@ onUnmounted(() => {
|
|||||||
dialogueStore.setDialogue({})
|
dialogueStore.setDialogue({})
|
||||||
}
|
}
|
||||||
clearMultiSelect()
|
clearMultiSelect()
|
||||||
|
if (avatarPressTimer) {
|
||||||
|
clearTimeout(avatarPressTimer)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
@ -190,13 +190,14 @@ onMounted(() => {
|
|||||||
|
|
||||||
//输入搜索文本
|
//输入搜索文本
|
||||||
const inputSearchText = (e) => {
|
const inputSearchText = (e) => {
|
||||||
// console.log(e)
|
|
||||||
if (e.trim() != state.searchText.trim()) {
|
if (e.trim() != state.searchText.trim()) {
|
||||||
state.pageNum = 1
|
state.pageNum = 1
|
||||||
|
state.searchResult = null // 清空搜索结果
|
||||||
emits('lastIdChange', 0, 0, 0)
|
emits('lastIdChange', 0, 0, 0)
|
||||||
}
|
}
|
||||||
state.searchText = e.trim()
|
state.searchText = e.trim()
|
||||||
if (!e.trim()) {
|
if (!e.trim()) {
|
||||||
|
state.searchResult = null // 清空搜索结果
|
||||||
emits('lastIdChange', 0, 0, 0)
|
emits('lastIdChange', 0, 0, 0)
|
||||||
}
|
}
|
||||||
zPaging.value?.reload()
|
zPaging.value?.reload()
|
||||||
@ -261,6 +262,7 @@ const queryAllSearch = (pageNum, searchResultPageSize) => {
|
|||||||
item.group_type = 0
|
item.group_type = 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let tempGeneral_infos = Array.isArray(data.general_infos)
|
let tempGeneral_infos = Array.isArray(data.general_infos)
|
||||||
? [...data.general_infos]
|
? [...data.general_infos]
|
||||||
: data.general_infos
|
: data.general_infos
|
||||||
@ -269,6 +271,8 @@ const queryAllSearch = (pageNum, searchResultPageSize) => {
|
|||||||
data.group_member_infos || [],
|
data.group_member_infos || [],
|
||||||
)
|
)
|
||||||
data.general_infos = tempGeneral_infos
|
data.general_infos = tempGeneral_infos
|
||||||
|
|
||||||
|
// 检查数据是否为空
|
||||||
let isEmpty = true
|
let isEmpty = true
|
||||||
let dataKeys = Object.keys(data)
|
let dataKeys = Object.keys(data)
|
||||||
let paginationKey = ''
|
let paginationKey = ''
|
||||||
@ -278,27 +282,36 @@ const queryAllSearch = (pageNum, searchResultPageSize) => {
|
|||||||
isEmpty = false
|
isEmpty = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (isEmpty) {
|
if (isEmpty) {
|
||||||
if (pageNum == 1) {
|
if (pageNum === 1) {
|
||||||
|
// 第一页请求且为空,清空结果
|
||||||
|
state.searchResult = null
|
||||||
zPaging.value?.complete([])
|
zPaging.value?.complete([])
|
||||||
} else {
|
} else {
|
||||||
data = state.searchResult
|
// 加载更多且为空,保持原列表不变
|
||||||
zPaging.value?.complete([data])
|
zPaging.value?.complete(state.searchResult ? [state.searchResult] : [])
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (props.isPagination) {
|
if (props.isPagination) {
|
||||||
if (
|
if (pageNum === 1) {
|
||||||
paginationKey &&
|
// 第一页请求,直接设置新数据
|
||||||
Array.isArray(
|
state.searchResult = data
|
||||||
(state?.searchResult && state?.searchResult[paginationKey]) || [],
|
} else {
|
||||||
) &&
|
// 加载更多,合并数据
|
||||||
((state?.searchResult && state?.searchResult[paginationKey]) || [])
|
if (
|
||||||
.length > 0
|
paginationKey &&
|
||||||
) {
|
Array.isArray(
|
||||||
data[paginationKey] = state.searchResult[paginationKey].concat(
|
(state?.searchResult && state?.searchResult[paginationKey]) || [],
|
||||||
data[paginationKey],
|
)
|
||||||
)
|
) {
|
||||||
|
data[paginationKey] = state.searchResult[paginationKey].concat(
|
||||||
|
data[paginationKey],
|
||||||
|
)
|
||||||
|
}
|
||||||
|
state.searchResult = data
|
||||||
}
|
}
|
||||||
|
|
||||||
emits(
|
emits(
|
||||||
'lastIdChange',
|
'lastIdChange',
|
||||||
data.last_id,
|
data.last_id,
|
||||||
@ -315,17 +328,31 @@ const queryAllSearch = (pageNum, searchResultPageSize) => {
|
|||||||
}
|
}
|
||||||
zPaging.value?.completeByTotal([data], total)
|
zPaging.value?.completeByTotal([data], total)
|
||||||
} else {
|
} else {
|
||||||
|
state.searchResult = data
|
||||||
zPaging.value?.complete([data])
|
zPaging.value?.complete([data])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.searchResult = data
|
|
||||||
} else {
|
} else {
|
||||||
zPaging.value?.complete([])
|
if (pageNum === 1) {
|
||||||
|
// 第一页请求失败,清空结果
|
||||||
|
state.searchResult = null
|
||||||
|
zPaging.value?.complete([])
|
||||||
|
} else {
|
||||||
|
// 加载更多失败,保持原列表不变
|
||||||
|
zPaging.value?.complete(state.searchResult ? [state.searchResult] : [])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
resp.catch(() => {
|
resp.catch(() => {
|
||||||
zPaging.value?.complete([])
|
if (pageNum === 1) {
|
||||||
|
// 第一页请求异常,清空结果
|
||||||
|
state.searchResult = null
|
||||||
|
zPaging.value?.complete([])
|
||||||
|
} else {
|
||||||
|
// 加载更多异常,保持原列表不变
|
||||||
|
zPaging.value?.complete(state.searchResult ? [state.searchResult] : [])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ import { createGlobalState, useStorage } from '@vueuse/core'
|
|||||||
import { uniStorage } from '@/utils/uniStorage.js'
|
import { uniStorage } from '@/utils/uniStorage.js'
|
||||||
|
|
||||||
export const useDialogueListStore = createGlobalState(() => {
|
export const useDialogueListStore = createGlobalState(() => {
|
||||||
// const dialogueList = useStorage('dialogueList', [], uniStorage)
|
const dialogueList = useStorage('dialogueList', [], uniStorage)
|
||||||
const dialogueList = ref([])
|
// const dialogueList = ref([])
|
||||||
const zpagingRef = ref()
|
const zpagingRef = ref()
|
||||||
const virtualList = ref([])
|
const virtualList = ref([])
|
||||||
|
|
||||||
@ -19,18 +19,47 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
const addDialogueRecord = (newRecords, type = 'add') => {
|
const addDialogueRecord = (newRecords, type = 'add') => {
|
||||||
console.log(newRecords)
|
console.log(newRecords)
|
||||||
|
|
||||||
const dialogue = lodash.cloneDeep(useDialogueStore())
|
const dialogue = useDialogueStore()
|
||||||
if (!dialogue || typeof dialogue !== 'object') return
|
if (!dialogue || typeof dialogue !== 'object') return
|
||||||
// 检查是否已存在相同 index_name 的对话
|
// 检查是否已存在相同 index_name 的对话
|
||||||
const existingIndex = dialogueList.value.findIndex(
|
const existingIndex = dialogueList.value.findIndex(
|
||||||
(item) => item.index_name === dialogue.index_name,
|
(item) => item.index_name === dialogue.index_name,
|
||||||
)
|
)
|
||||||
if (existingIndex === -1) {
|
if (existingIndex === -1) {
|
||||||
// 如果不存在,直接添加
|
// 如果不存在,创建新对话,只保存需要的属性
|
||||||
dialogueList.value.push(dialogue)
|
const newDialogue = {
|
||||||
|
index_name: dialogue.index_name,
|
||||||
|
talk: {
|
||||||
|
username: dialogue.talk.username,
|
||||||
|
talk_type: dialogue.talk.talk_type,
|
||||||
|
receiver_id: dialogue.talk.receiver_id
|
||||||
|
},
|
||||||
|
online: dialogue.online,
|
||||||
|
records: dialogue.records || [],
|
||||||
|
unreadBubble: dialogue.unreadBubble,
|
||||||
|
isOpenMultiSelect: dialogue.isOpenMultiSelect,
|
||||||
|
isShowEditor: dialogue.isShowEditor,
|
||||||
|
isShowSessionList: dialogue.isShowSessionList,
|
||||||
|
isDismiss: dialogue.isDismiss,
|
||||||
|
members: dialogue.members.map(member => ({
|
||||||
|
id: member.id,
|
||||||
|
nickname: member.nickname,
|
||||||
|
avatar: member.avatar,
|
||||||
|
gender: member.gender,
|
||||||
|
leader: member.leader,
|
||||||
|
remark: member.remark,
|
||||||
|
online: member.online,
|
||||||
|
value: member.value,
|
||||||
|
key: member.key,
|
||||||
|
erp_user_id: member.erp_user_id,
|
||||||
|
is_mute: member.is_mute,
|
||||||
|
is_mine: member.is_mine
|
||||||
|
})),
|
||||||
|
forwardType: dialogue.forwardType
|
||||||
|
}
|
||||||
|
dialogueList.value.push(newDialogue)
|
||||||
} else {
|
} else {
|
||||||
// 如果对话存在,处理 records 数组
|
// 如果对话存在,处理 records 数组
|
||||||
const { records = [] } = dialogue
|
|
||||||
newRecords.forEach((newRecord) => {
|
newRecords.forEach((newRecord) => {
|
||||||
const recordIndex = dialogueList.value[existingIndex].records.findIndex(
|
const recordIndex = dialogueList.value[existingIndex].records.findIndex(
|
||||||
(record) => record.msg_id === newRecord.msg_id,
|
(record) => record.msg_id === newRecord.msg_id,
|
||||||
@ -45,18 +74,11 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 更新除 records 和 index_name 外的其他属性
|
|
||||||
const { index_name, records: _, ...updateProps } = dialogue
|
|
||||||
dialogueList.value[existingIndex] = {
|
|
||||||
...dialogueList.value[existingIndex],
|
|
||||||
...updateProps,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const updateDialogueRecord = (record) => {
|
const updateDialogueRecord = (record) => {
|
||||||
const dialogue = lodash.cloneDeep(useDialogueStore())
|
const dialogue = useDialogueStore()
|
||||||
const item = getDialogueList(dialogue.index_name)
|
const item = getDialogueList(dialogue.index_name)
|
||||||
const recordIndex = item.records.findIndex(
|
const recordIndex = item.records.findIndex(
|
||||||
(item) => item.msg_id === record.msg_id,
|
(item) => item.msg_id === record.msg_id,
|
||||||
@ -79,7 +101,7 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const deleteDialogueRecord = (record) => {
|
const deleteDialogueRecord = (record) => {
|
||||||
const dialogue = lodash.cloneDeep(useDialogueStore())
|
const dialogue = useDialogueStore()
|
||||||
const item = getDialogueList(dialogue.index_name)
|
const item = getDialogueList(dialogue.index_name)
|
||||||
const recordIndex = item.records.findIndex(
|
const recordIndex = item.records.findIndex(
|
||||||
(item) => item.msg_id === record.msg_id,
|
(item) => item.msg_id === record.msg_id,
|
||||||
@ -105,7 +127,7 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const addChatRecord = (indexName, item) => {
|
const addChatRecord = (indexName, item) => {
|
||||||
const dialogue = lodash.cloneDeep(useDialogueStore())
|
const dialogue = useDialogueStore()
|
||||||
if (dialogue?.index_name === indexName) {
|
if (dialogue?.index_name === indexName) {
|
||||||
if (item?.file_num) {
|
if (item?.file_num) {
|
||||||
const index = virtualList.value.findIndex(
|
const index = virtualList.value.findIndex(
|
||||||
@ -125,7 +147,7 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const batchDelDialogueRecord = (msgIds) => {
|
const batchDelDialogueRecord = (msgIds) => {
|
||||||
const dialogue = lodash.cloneDeep(useDialogueStore())
|
const dialogue = useDialogueStore()
|
||||||
const item = getDialogueList(dialogue.index_name)
|
const item = getDialogueList(dialogue.index_name)
|
||||||
item.records = item.records.filter((item) => !msgIds.includes(item.msg_id))
|
item.records = item.records.filter((item) => !msgIds.includes(item.msg_id))
|
||||||
}
|
}
|
||||||
@ -143,7 +165,7 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
|
|
||||||
//清空聊天记录时,同时清空本地保存的聊天记录
|
//清空聊天记录时,同时清空本地保存的聊天记录
|
||||||
const clearDialogueRecord = () => {
|
const clearDialogueRecord = () => {
|
||||||
const dialogue = lodash.cloneDeep(useDialogueStore())
|
const dialogue = useDialogueStore()
|
||||||
const item = getDialogueList(dialogue.index_name)
|
const item = getDialogueList(dialogue.index_name)
|
||||||
item.records = []
|
item.records = []
|
||||||
virtualList.value = []
|
virtualList.value = []
|
||||||
|
@ -153,5 +153,6 @@
|
|||||||
"choose.deps.current": "当前",
|
"choose.deps.current": "当前",
|
||||||
"chat.mention.select": "选择提醒的人",
|
"chat.mention.select": "选择提醒的人",
|
||||||
"do.phone.call": "拨打",
|
"do.phone.call": "拨打",
|
||||||
"popup.title.phone": "电话"
|
"popup.title.phone": "电话",
|
||||||
|
"pageTitle.view.deps": "查看部门"
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,8 @@ import { parseTime } from './datetime'
|
|||||||
export const KEY_INDEX_NAME = 'send_message_index_name'
|
export const KEY_INDEX_NAME = 'send_message_index_name'
|
||||||
|
|
||||||
export function formatTalkRecord(uid, data) {
|
export function formatTalkRecord(uid, data) {
|
||||||
data.float = 'center'
|
// 不再设置float值,改为在模板中动态判断
|
||||||
|
|
||||||
if (data.user_id > 0) {
|
|
||||||
data.float = data.user_id == uid ? 'right' : 'left'
|
|
||||||
}
|
|
||||||
|
|
||||||
data.isCheck = false
|
data.isCheck = false
|
||||||
|
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user