Compare commits
No commits in common. "f511244d5996ebac51d5c0f83374367ffa5a2212" and "a5a70391a4b5c439b93c69fe5ea4b9498a832fd1" have entirely different histories.
f511244d59
...
a5a70391a4
@ -94,8 +94,3 @@ export const ServeConfirmVoteHandle = (data = {}) => {
|
|||||||
export const ServeEmptyMessage = (data) => {
|
export const ServeEmptyMessage = (data) => {
|
||||||
return post('/api/v1/talk/message/empty', data)
|
return post('/api/v1/talk/message/empty', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取消息已读未读详情
|
|
||||||
export const ServeMessageReadDetail = (data) => {
|
|
||||||
return post('/api/v1/talk/my-records/read/condition', data)
|
|
||||||
}
|
|
||||||
|
@ -5,16 +5,6 @@ export const ServeSeachQueryAll = (data = {}) => {
|
|||||||
return post('/api/v1/elasticsearch/query-all', data)
|
return post('/api/v1/elasticsearch/query-all', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ES搜索用户数据
|
|
||||||
export const ServeQueryUser = (data) => {
|
|
||||||
return post('/api/v1/elasticsearch/query-user', data)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ES搜索群组数据
|
|
||||||
export const ServeQueryGroup = (data) => {
|
|
||||||
return post('/api/v1/elasticsearch/query-group', data)
|
|
||||||
}
|
|
||||||
|
|
||||||
//ES搜索聊天记录-主页搜索什么都有、聊天记录
|
//ES搜索聊天记录-主页搜索什么都有、聊天记录
|
||||||
export const ServeQueryTalkRecord = (data = {}) => {
|
export const ServeQueryTalkRecord = (data = {}) => {
|
||||||
return post('/api/v1/elasticsearch/query-talk-record', data)
|
return post('/api/v1/elasticsearch/query-talk-record', data)
|
||||||
|
@ -11,14 +11,13 @@ import {
|
|||||||
ServeSecedeGroup,
|
ServeSecedeGroup,
|
||||||
ServeUpdateGroupCard,
|
ServeUpdateGroupCard,
|
||||||
ServeGetGroupNotices,
|
ServeGetGroupNotices,
|
||||||
ServeEditGroup,
|
ServeEditGroup
|
||||||
ServeDismissGroup
|
|
||||||
} from '@/api/group'
|
} from '@/api/group'
|
||||||
import { useInject } from '@/hooks'
|
import { useInject } from '@/hooks'
|
||||||
import customModal from '@/components/common/customModal.vue'
|
import customModal from '@/components/common/customModal.vue'
|
||||||
import avatarModule from '@/components/avatar-module/index.vue'
|
import avatarModule from '@/components/avatar-module/index.vue'
|
||||||
import UserCardModal from '@/components/user/UserCardModal.vue'
|
import UserCardModal from '@/components/user/UserCardModal.vue'
|
||||||
import { ServeEmptyMessage, ServeTopTalkList, ServeSetNotDisturb } from '@/api/chat'
|
import { ServeEmptyMessage } from '@/api/chat'
|
||||||
import { parseTime } from '@/utils/datetime'
|
import { parseTime } from '@/utils/datetime'
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
@ -49,12 +48,6 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const talkParams = reactive({
|
|
||||||
isTop: computed(() => talkStore.findItem(props.talkType + '_' + props.gid)?.is_top),
|
|
||||||
isDisturb: computed(() => talkStore.findItem(props.talkType + '_' + props.gid)?.is_disturb),
|
|
||||||
sessionId: computed(() => talkStore.findItem(props.talkType + '_' + props.gid)?.id)
|
|
||||||
})
|
|
||||||
|
|
||||||
watch(props, () => {
|
watch(props, () => {
|
||||||
if (props.talkType === 2) {
|
if (props.talkType === 2) {
|
||||||
loadDetail()
|
loadDetail()
|
||||||
@ -105,8 +98,7 @@ const state = reactive({
|
|||||||
}, //群公告信息
|
}, //群公告信息
|
||||||
editGroupName: false, //是否编辑群名称
|
editGroupName: false, //是否编辑群名称
|
||||||
editGroupNameValue: '', //编辑中的群名称
|
editGroupNameValue: '', //编辑中的群名称
|
||||||
chatSettingOperateType: '', //聊天设置操作类型
|
chatSettingOperateType: '' //聊天设置操作类型
|
||||||
isLastAdmin: false //是否是最后一个管理员
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const members = ref<any[]>([])
|
const members = ref<any[]>([])
|
||||||
@ -185,36 +177,17 @@ const onClose = () => {
|
|||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSignOut = (closeLoading) => {
|
const onSignOut = () => {
|
||||||
ServeSecedeGroup({
|
ServeSecedeGroup({
|
||||||
group_id: props.gid
|
group_id: props.gid
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
window['$message'].success('已退出群聊')
|
||||||
|
onClose()
|
||||||
|
} else {
|
||||||
|
window['$message'].error(res.message)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.then((res) => {
|
|
||||||
closeLoading()
|
|
||||||
if (res.code == 200) {
|
|
||||||
window['$message'].success('已退出群聊')
|
|
||||||
state.isShowModal = false
|
|
||||||
onClose()
|
|
||||||
} else {
|
|
||||||
window['$message'].error(res.message || res.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
closeLoading()
|
|
||||||
window['$message'].error(err.message)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const onDismiss = async (closeLoading) => {
|
|
||||||
const { code, message } = await ServeDismissGroup({ group_id: props.gid })
|
|
||||||
closeLoading()
|
|
||||||
if (code === 200) {
|
|
||||||
onClose()
|
|
||||||
state.isShowModal = false
|
|
||||||
window['$message'].success('群聊已解散')
|
|
||||||
} else {
|
|
||||||
window['$message'].info(message)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onChangeRemark = () => {
|
const onChangeRemark = () => {
|
||||||
@ -263,18 +236,8 @@ const handleModalConfirm = (closeLoading) => {
|
|||||||
closeLoading()
|
closeLoading()
|
||||||
window['$message'].error(err.message)
|
window['$message'].error(err.message)
|
||||||
})
|
})
|
||||||
} else if (state.chatSettingOperateType == 'quit') {
|
} else if (state.chatSettingOperateType == 'quit'){
|
||||||
//退出群聊
|
//退出群聊
|
||||||
if (state.isLastAdmin) {
|
|
||||||
//如果是最后一个管理员,则退出同时解散群聊
|
|
||||||
onDismiss(closeLoading)
|
|
||||||
} else {
|
|
||||||
//如果不是最后一个管理员,则退出群聊
|
|
||||||
onSignOut(closeLoading)
|
|
||||||
}
|
|
||||||
} else if (state.chatSettingOperateType == 'dismiss') {
|
|
||||||
//解散群聊
|
|
||||||
onDismiss(closeLoading)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,15 +256,12 @@ const showChatSettingOperateModal = (type: string) => {
|
|||||||
break
|
break
|
||||||
case 'quit':
|
case 'quit':
|
||||||
state.chatSettingOperateHint = '确定退出群聊'
|
state.chatSettingOperateHint = '确定退出群聊'
|
||||||
const findOtherAdmin = groupMemberList.value.find(
|
const findAdmin = groupMemberList.value.find((item) => item.leader === 2 || item.leader === 1)
|
||||||
(item) => (item.leader === 2 || item.leader === 1) && item.user_id !== userStore.uid
|
const isLastAdmin = findAdmin && findAdmin.user_id === userStore.uid
|
||||||
)
|
if (isLastAdmin) {
|
||||||
if (findOtherAdmin) {
|
|
||||||
state.isLastAdmin = false
|
|
||||||
state.chatSettingOperateSubHint = '退出后,聊天记录将被清空'
|
|
||||||
} else {
|
|
||||||
state.isLastAdmin = true
|
|
||||||
state.chatSettingOperateSubHint = '退出后,本群将被解散'
|
state.chatSettingOperateSubHint = '退出后,本群将被解散'
|
||||||
|
} else {
|
||||||
|
state.chatSettingOperateSubHint = '退出后,聊天记录将被清空'
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@ -420,42 +380,6 @@ const handleEditGroupNameConfirm = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置会话置顶
|
|
||||||
const onTopChange = (value: boolean) => {
|
|
||||||
ServeTopTalkList({
|
|
||||||
list_id: talkParams.sessionId,
|
|
||||||
type: value ? 1 : 2
|
|
||||||
}).then(({ code, message }) => {
|
|
||||||
if (code == 200) {
|
|
||||||
talkStore.updateItem({
|
|
||||||
index_name: props.talkType + '_' + props.gid,
|
|
||||||
is_top: talkParams.isTop == 0 ? 1 : 0
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
window['$message'].error(message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
//设置会话免打扰
|
|
||||||
const onDisturbChange = (value: boolean) => {
|
|
||||||
ServeSetNotDisturb({
|
|
||||||
talk_type: props.talkType,
|
|
||||||
receiver_id: props.gid,
|
|
||||||
is_disturb: value ? 1 : 0
|
|
||||||
}).then(({ code, message }) => {
|
|
||||||
if (code == 200) {
|
|
||||||
window['$message'].success('设置成功!')
|
|
||||||
talkStore.updateItem({
|
|
||||||
index_name: props.talkType + '_' + props.gid,
|
|
||||||
is_disturb: value ? 1 : 0
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
window['$message'].error(message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<section class="el-container is-vertical section">
|
<section class="el-container is-vertical section">
|
||||||
@ -678,14 +602,14 @@ const onDisturbChange = (value: boolean) => {
|
|||||||
<div class="b-box" style="margin: 16px 0 32px;">
|
<div class="b-box" style="margin: 16px 0 32px;">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<div class="title">置顶会话</div>
|
<div class="title">置顶会话</div>
|
||||||
<n-switch :value="talkParams.isTop === 1" @update:value="onTopChange" />
|
<n-switch />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="b-box" style="margin: 32px 0 20px;">
|
<div class="b-box" style="margin: 32px 0 20px;">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<div class="title">消息免打扰</div>
|
<div class="title">消息免打扰</div>
|
||||||
<n-switch :value="talkParams.isDisturb === 1" @update:value="onDisturbChange" />
|
<n-switch />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -809,11 +733,9 @@ const onDisturbChange = (value: boolean) => {
|
|||||||
<template #content>
|
<template #content>
|
||||||
<div class="custom-modal-content">
|
<div class="custom-modal-content">
|
||||||
<text>{{ state.chatSettingOperateHint }}</text>
|
<text>{{ state.chatSettingOperateHint }}</text>
|
||||||
<text
|
<text style="font-size: 16px; color: #999999; margin: 0; line-height: 22px;">{{
|
||||||
style="font-size: 16px; color: #999999; margin: 0; line-height: 22px;"
|
state.chatSettingOperateSubHint
|
||||||
:style="{ color: state.isLastAdmin ? '#CF3050' : '' }"
|
}}</text>
|
||||||
>{{ state.chatSettingOperateSubHint }}</text
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</customModal>
|
</customModal>
|
||||||
|
@ -327,7 +327,7 @@ import { parseTime } from '@/utils/datetime'
|
|||||||
import { fileFormatSize, fileSuffix } from '@/utils/strings'
|
import { fileFormatSize, fileSuffix } from '@/utils/strings'
|
||||||
import { NImage, NInfiniteScroll, NScrollbar, NIcon, NDatePicker } from 'naive-ui'
|
import { NImage, NInfiniteScroll, NScrollbar, NIcon, NDatePicker } from 'naive-ui'
|
||||||
|
|
||||||
const emits = defineEmits(['clearSearchMemberByAlphabet', 'getDisabledDateArray', 'hideSearchResultModal'])
|
const emits = defineEmits(['clearSearchMemberByAlphabet', 'getDisabledDateArray'])
|
||||||
|
|
||||||
const dialogueStore = useDialogueStore()
|
const dialogueStore = useDialogueStore()
|
||||||
// 当前对话参数
|
// 当前对话参数
|
||||||
@ -736,29 +736,15 @@ const downloadAndOpenFile = (item) => {
|
|||||||
|
|
||||||
//跳转到对应的记录位置
|
//跳转到对应的记录位置
|
||||||
const toDialogueByMember = async (msgInfo) => {
|
const toDialogueByMember = async (msgInfo) => {
|
||||||
console.error('====跳转到对应的记录位置====', msgInfo)
|
const sessionId = await getSessionId(dialogueParams.talk_type, dialogueParams.receiver_id)
|
||||||
// 根据搜索结果, 指定用于查询指定消息上下文的sequence
|
uni.navigateTo({
|
||||||
dialogueStore.specifiedMsg = encodeURIComponent(
|
url:
|
||||||
JSON.stringify({
|
'/pages/dialog/index?sessionId=' +
|
||||||
talk_type: msgInfo.talk_type,
|
sessionId +
|
||||||
receiver_id: msgInfo.receiver_id,
|
'&keepDialogInfo=1' +
|
||||||
msg_id: msgInfo.msg_id,
|
'&msgInfo=' +
|
||||||
cursor: msgInfo.sequence - 15 > 0 ? msgInfo.sequence - 15 : 0,
|
encodeURIComponent(JSON.stringify(msgInfo))
|
||||||
direction: 'down',
|
})
|
||||||
sort_sequence: 'asc',
|
|
||||||
create_time: msgInfo.created_at
|
|
||||||
})
|
|
||||||
)
|
|
||||||
emits('hideSearchResultModal')
|
|
||||||
// const sessionId = await getSessionId(dialogueParams.talk_type, dialogueParams.receiver_id)
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url:
|
|
||||||
// '/pages/dialog/index?sessionId=' +
|
|
||||||
// sessionId +
|
|
||||||
// '&keepDialogInfo=1' +
|
|
||||||
// '&msgInfo=' +
|
|
||||||
// encodeURIComponent(JSON.stringify(msgInfo))
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//重置部分搜索条件
|
//重置部分搜索条件
|
||||||
|
@ -41,13 +41,7 @@
|
|||||||
>
|
>
|
||||||
<searchItem
|
<searchItem
|
||||||
@click="clickSearchItem(searchResultKey, item)"
|
@click="clickSearchItem(searchResultKey, item)"
|
||||||
v-if="(
|
v-if="(props.listLimit && index < 3) || !props.listLimit"
|
||||||
searchResultKey === 'user_infos'
|
|
||||||
? (state.userInfosShowAll || (props.listLimit && index < 3))
|
|
||||||
: searchResultKey === 'combinedGroup'
|
|
||||||
? (state.groupInfosShowAll || (props.listLimit && index < 3))
|
|
||||||
: (props.listLimit && index < 3)
|
|
||||||
) || !props.listLimit"
|
|
||||||
:searchResultKey="searchResultKey"
|
:searchResultKey="searchResultKey"
|
||||||
:searchItem="item"
|
:searchItem="item"
|
||||||
:searchText="state.searchText"
|
:searchText="state.searchText"
|
||||||
@ -62,14 +56,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="result-has-more"
|
class="result-has-more"
|
||||||
v-if="
|
v-if="getHasMoreResult(searchResultKey)"
|
||||||
getHasMoreResult(searchResultKey) &&
|
@click="toMoreResultPage(searchResultKey)"
|
||||||
!(
|
|
||||||
(searchResultKey === 'user_infos' && state.userInfosExpand) ||
|
|
||||||
(searchResultKey === 'combinedGroup' && state.groupInfosExpand)
|
|
||||||
)
|
|
||||||
"
|
|
||||||
@click="onMoreResultClick(searchResultKey)"
|
|
||||||
>
|
>
|
||||||
<span class="text-[14px] font-regular">
|
<span class="text-[14px] font-regular">
|
||||||
{{ getHasMoreResult(searchResultKey) }}
|
{{ getHasMoreResult(searchResultKey) }}
|
||||||
@ -159,7 +147,6 @@
|
|||||||
import { NInfiniteScroll } from 'naive-ui'
|
import { NInfiniteScroll } from 'naive-ui'
|
||||||
import searchItem from './searchItem.vue'
|
import searchItem from './searchItem.vue'
|
||||||
import { ref, reactive, defineEmits, defineProps, onMounted, watch } from 'vue'
|
import { ref, reactive, defineEmits, defineProps, onMounted, watch } from 'vue'
|
||||||
import { ServeQueryUser, ServeQueryGroup } from '@/api/search'
|
|
||||||
|
|
||||||
const emits = defineEmits([
|
const emits = defineEmits([
|
||||||
'toMoreResultPage',
|
'toMoreResultPage',
|
||||||
@ -177,16 +164,7 @@ const state = reactive({
|
|||||||
uid: 12303, //当前用户id
|
uid: 12303, //当前用户id
|
||||||
clickStayItem: '', //点击停留的item
|
clickStayItem: '', //点击停留的item
|
||||||
hasMore: true, //是否还有更多数据
|
hasMore: true, //是否还有更多数据
|
||||||
loading: false, //加载锁
|
loading: false //加载锁
|
||||||
userInfosExpand: false, // 控制通讯录全部加载完
|
|
||||||
userInfosLoading: false, // 控制通讯录加载更多状态
|
|
||||||
userInfosLastId: undefined, // 记录通讯录分页的 last_id
|
|
||||||
userInfosShowAll: false, // 只要点过"更多通讯录"就为 true
|
|
||||||
groupInfosExpand: false, // 控制群聊全部加载完
|
|
||||||
groupInfosLoading: false, // 控制群聊加载更多状态
|
|
||||||
groupInfosLastGroupId: 0, // 记录群聊分页的 last_group_id
|
|
||||||
groupInfosLastMemberId: 0, // 记录群聊分页的 last_member_id
|
|
||||||
groupInfosShowAll: false // 只要点过"更多群聊"就为 true
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -236,11 +214,7 @@ const props = defineProps({
|
|||||||
useCustomTitle: {
|
useCustomTitle: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}, //是否使用自定义标题
|
} //是否使用自定义标题
|
||||||
selectItemInList: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
} //在列表选中的聊天记录搜索项
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@ -273,13 +247,6 @@ watch(
|
|||||||
emits('clickStayItemChange', state.clickStayItem)
|
emits('clickStayItemChange', state.clickStayItem)
|
||||||
//重置搜索条件
|
//重置搜索条件
|
||||||
emits('lastIdChange', 0, 0, 0, '', '')
|
emits('lastIdChange', 0, 0, 0, '', '')
|
||||||
state.userInfosExpand = false
|
|
||||||
state.userInfosShowAll = false
|
|
||||||
state.userInfosLastId = undefined
|
|
||||||
state.groupInfosExpand = false
|
|
||||||
state.groupInfosShowAll = false
|
|
||||||
state.groupInfosLastGroupId = 0
|
|
||||||
state.groupInfosLastMemberId = 0
|
|
||||||
queryAllSearch()
|
queryAllSearch()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -417,12 +384,6 @@ const queryAllSearch = (doClearSearchResult) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.pageNum = state.pageNum + 1
|
state.pageNum = state.pageNum + 1
|
||||||
// 同步 userInfosLastId
|
|
||||||
if (typeof data.last_id !== 'undefined') {
|
|
||||||
state.userInfosLastId = data.last_id
|
|
||||||
} else {
|
|
||||||
state.userInfosLastId = undefined
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (state.pageNum === 1) {
|
if (state.pageNum === 1) {
|
||||||
// 第一页请求失败,清空结果
|
// 第一页请求失败,清空结果
|
||||||
@ -577,13 +538,6 @@ const clickSearchItem = (searchResultKey, searchItem) => {
|
|||||||
|
|
||||||
//加载更多数据
|
//加载更多数据
|
||||||
const doLoadMore = (doClearSearchResult) => {
|
const doLoadMore = (doClearSearchResult) => {
|
||||||
if (
|
|
||||||
state.userInfosLoading ||
|
|
||||||
state.userInfosShowAll ||
|
|
||||||
state.groupInfosShowAll // 新增判断,群聊展开后不再触发 queryAllSearch
|
|
||||||
) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!state.hasMore || state.loading) {
|
if (!state.hasMore || state.loading) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -592,134 +546,6 @@ const doLoadMore = (doClearSearchResult) => {
|
|||||||
state.loading = false
|
state.loading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.selectItemInList,
|
|
||||||
(newVal, oldVal) => {
|
|
||||||
if (newVal) {
|
|
||||||
const selectedItem = JSON.parse(decodeURIComponent(newVal))
|
|
||||||
clickSearchItem('general_infos', selectedItem)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
deep: true,
|
|
||||||
immediate: true
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
// 单独维护通讯录加载更多逻辑,基于 last_id 分页
|
|
||||||
async function loadMoreUserInfos() {
|
|
||||||
if (state.userInfosLoading) return
|
|
||||||
state.userInfosLoading = true
|
|
||||||
try {
|
|
||||||
let params = {
|
|
||||||
key: state.searchText,
|
|
||||||
last_id: state.userInfosLastId,
|
|
||||||
size: 10
|
|
||||||
}
|
|
||||||
const resp = await ServeQueryUser(params)
|
|
||||||
if (resp.code === 200 && Array.isArray(resp.data.user_infos)) {
|
|
||||||
if (!state.userInfosLastId) {
|
|
||||||
// 第一次加载,直接替换
|
|
||||||
state.searchResult = {
|
|
||||||
...state.searchResult,
|
|
||||||
user_infos: resp.data.user_infos
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 后续加载,追加
|
|
||||||
state.searchResult = {
|
|
||||||
...state.searchResult,
|
|
||||||
user_infos: (state.searchResult.user_infos || []).concat(resp.data.user_infos)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
state.userInfosLastId = resp.data.last_id
|
|
||||||
// 判断是否全部加载完
|
|
||||||
if (
|
|
||||||
!resp.data.last_id ||
|
|
||||||
(Array.isArray(resp.data.user_infos) && resp.data.user_infos.length < 10)
|
|
||||||
) {
|
|
||||||
state.userInfosExpand = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
state.userInfosLoading = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 处理"更多通讯录"、 "更多群聊"点击,调用新方法
|
|
||||||
function onMoreResultClick(searchResultKey) {
|
|
||||||
if (searchResultKey === 'user_infos') {
|
|
||||||
state.userInfosShowAll = true
|
|
||||||
loadMoreUserInfos()
|
|
||||||
} else if (searchResultKey === 'combinedGroup') {
|
|
||||||
state.groupInfosShowAll = true
|
|
||||||
loadMoreGroupInfos()
|
|
||||||
} else {
|
|
||||||
emits('toMoreResultPage', searchResultKey, state.searchText)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 单独维护群聊加载更多逻辑,基于 last_id 分页
|
|
||||||
async function loadMoreGroupInfos() {
|
|
||||||
if (state.groupInfosLoading) return
|
|
||||||
state.groupInfosLoading = true
|
|
||||||
try {
|
|
||||||
let params = {
|
|
||||||
key: state.searchText,
|
|
||||||
last_group_id: state.groupInfosLastGroupId,
|
|
||||||
last_member_id: state.groupInfosLastMemberId,
|
|
||||||
size: 10
|
|
||||||
}
|
|
||||||
const resp = await ServeQueryGroup(params)
|
|
||||||
if (resp.code === 200) {
|
|
||||||
const groupInfos = Array.isArray(resp.data.group_infos) ? resp.data.group_infos : []
|
|
||||||
const groupMemberInfos = Array.isArray(resp.data.group_member_infos) ? resp.data.group_member_infos : []
|
|
||||||
|
|
||||||
// 给新数据加上 groupTempType
|
|
||||||
groupInfos.forEach(item => {
|
|
||||||
item.groupTempType = 'group_infos'
|
|
||||||
item.group_type = item.type // 保持一致性
|
|
||||||
})
|
|
||||||
groupMemberInfos.forEach(item => {
|
|
||||||
item.groupTempType = 'group_member_infos'
|
|
||||||
})
|
|
||||||
|
|
||||||
const isFirstLoad = (!state.groupInfosLastGroupId && !state.groupInfosLastMemberId) ||
|
|
||||||
(state.groupInfosLastGroupId === 0 && state.groupInfosLastMemberId === 0)
|
|
||||||
if (isFirstLoad) {
|
|
||||||
// 第一次加载,直接替换
|
|
||||||
state.searchResult = {
|
|
||||||
...state.searchResult,
|
|
||||||
group_infos: groupInfos,
|
|
||||||
group_member_infos: groupMemberInfos,
|
|
||||||
combinedGroup: groupInfos.concat(groupMemberInfos)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 后续加载,追加
|
|
||||||
const allGroupInfos = (state.searchResult.group_infos || []).concat(groupInfos)
|
|
||||||
const allGroupMemberInfos = (state.searchResult.group_member_infos || []).concat(groupMemberInfos)
|
|
||||||
state.searchResult = {
|
|
||||||
...state.searchResult,
|
|
||||||
group_infos: allGroupInfos,
|
|
||||||
group_member_infos: allGroupMemberInfos,
|
|
||||||
combinedGroup: allGroupInfos.concat(allGroupMemberInfos)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
state.groupInfosLastGroupId = resp.data.last_group_id
|
|
||||||
state.groupInfosLastMemberId = resp.data.last_member_id
|
|
||||||
// 判断是否全部加载完
|
|
||||||
const noMoreData = (
|
|
||||||
(!groupInfos.length && !groupMemberInfos.length) ||
|
|
||||||
(resp.data.last_group_id === 0 && resp.data.last_member_id === 0)
|
|
||||||
)
|
|
||||||
if (noMoreData) {
|
|
||||||
state.groupInfosExpand = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
state.groupInfosLoading = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search-list {
|
.search-list {
|
||||||
|
@ -24,7 +24,7 @@ const { showUserInfoModal } = useInject()
|
|||||||
<em v-show="index < extra.members.length - 1">、</em>
|
<em v-show="index < extra.members.length - 1">、</em>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span>移出群聊</span>
|
<span>踢出群聊</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -7,7 +7,6 @@ import EventTalk from './event/talk'
|
|||||||
import EventKeyboard from './event/keyboard'
|
import EventKeyboard from './event/keyboard'
|
||||||
import EventLogin from './event/login'
|
import EventLogin from './event/login'
|
||||||
import EventRevoke from './event/revoke'
|
import EventRevoke from './event/revoke'
|
||||||
import EventRead from './event/read'
|
|
||||||
import { getAccessToken, isLoggedIn } from './utils/auth'
|
import { getAccessToken, isLoggedIn } from './utils/auth'
|
||||||
|
|
||||||
const urlCallback = () => {
|
const urlCallback = () => {
|
||||||
@ -86,8 +85,6 @@ class Connect {
|
|||||||
this.onImContactStatus()
|
this.onImContactStatus()
|
||||||
this.onImMessageRevoke()
|
this.onImMessageRevoke()
|
||||||
this.onImMessageKeyboard()
|
this.onImMessageKeyboard()
|
||||||
this.onImMessageListenRead()
|
|
||||||
this.onImMessageListenReadIncr()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onPing() {
|
onPing() {
|
||||||
@ -134,16 +131,6 @@ class Connect {
|
|||||||
this.conn.on('im.message.revoke', (data: any) => new EventRevoke(data))
|
this.conn.on('im.message.revoke', (data: any) => new EventRevoke(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
onImMessageListenRead() {
|
|
||||||
// 消息已读回执监听事件(全量)
|
|
||||||
this.conn.on('im.message.listen.read', (data: any) => new EventRead(data, 'total'))
|
|
||||||
}
|
|
||||||
|
|
||||||
onImMessageListenReadIncr() {
|
|
||||||
// 消息已读回执监听事件(增量)
|
|
||||||
this.conn.on('im.message.listen.read.incr', (data: any) => new EventRead(data, 'incr'))
|
|
||||||
}
|
|
||||||
|
|
||||||
onImContactApply() {
|
onImContactApply() {
|
||||||
// 好友申请事件
|
// 好友申请事件
|
||||||
this.conn.on('im.contact.apply', (data: any) => {
|
this.conn.on('im.contact.apply', (data: any) => {
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
import Base from './base'
|
|
||||||
import { useTalkStore, useDialogueStore } from '@/store'
|
|
||||||
import ws from '@/connect'
|
|
||||||
import { bus } from '@/utils/event-bus'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 已读回执事件
|
|
||||||
*/
|
|
||||||
class Read extends Base {
|
|
||||||
/**
|
|
||||||
* @var resource 资源
|
|
||||||
*/
|
|
||||||
resource
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 场景类型
|
|
||||||
*/
|
|
||||||
type
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 初始化构造方法
|
|
||||||
*
|
|
||||||
* @param {Object} resource Socket消息
|
|
||||||
*/
|
|
||||||
constructor(resource, type) {
|
|
||||||
super()
|
|
||||||
|
|
||||||
this.resource = resource
|
|
||||||
this.type = type
|
|
||||||
this.handle()
|
|
||||||
}
|
|
||||||
|
|
||||||
handle() {
|
|
||||||
if (this.type == 'total') {
|
|
||||||
console.error('====接收到了新版已读回执全量=====', this.resource)
|
|
||||||
const readList = this.resource.result
|
|
||||||
if (readList.length > 0) {
|
|
||||||
readList.forEach((item) => {
|
|
||||||
useDialogueStore().updateDialogueRecord({
|
|
||||||
msg_id: item.msg_id,
|
|
||||||
read_total_num: item.read_total_num
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else if (this.type == 'incr') {
|
|
||||||
console.error('====接收到了新版已读回执增量=====', this.resource)
|
|
||||||
// 由于直接使用增量的数值,会导致消息列表的已读回执数量不准确,可能多可能少
|
|
||||||
// 所以收到增量消息后,直接手动触发一次查询全量
|
|
||||||
bus.emit('check-visible-out-elements', 'incr')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Read
|
|
@ -94,7 +94,7 @@ class Talk extends Base {
|
|||||||
useSettingsStore().isPromptTone && palyMusic()
|
useSettingsStore().isPromptTone && palyMusic()
|
||||||
}
|
}
|
||||||
|
|
||||||
async handle() {
|
handle() {
|
||||||
// 不是自己发送的消息则需要播放提示音
|
// 不是自己发送的消息则需要播放提示音
|
||||||
if (!this.isCurrSender()) {
|
if (!this.isCurrSender()) {
|
||||||
this.play()
|
this.play()
|
||||||
@ -102,18 +102,7 @@ class Talk extends Base {
|
|||||||
|
|
||||||
// 判断会话列表是否存在,不存在则创建
|
// 判断会话列表是否存在,不存在则创建
|
||||||
if (useTalkStore().findTalkIndex(this.getIndexName()) == -1) {
|
if (useTalkStore().findTalkIndex(this.getIndexName()) == -1) {
|
||||||
if (this.resource.msg_type == 1102) {
|
return this.addTalkItem()
|
||||||
//被邀请进入群聊时,需要热更新会话列表
|
|
||||||
await useTalkStore().loadTalkList()
|
|
||||||
} else if (this.resource.msg_type == 1106) {
|
|
||||||
//群解散时,需要热更新会话列表
|
|
||||||
await useTalkStore().loadTalkList()
|
|
||||||
} else if (this.resource.msg_type == 1104 || this.resource.msg_type == 1115) {
|
|
||||||
//群成员被移出时,需要热更新会话列表
|
|
||||||
await useTalkStore().loadTalkList()
|
|
||||||
} else {
|
|
||||||
return this.addTalkItem()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断当前是否正在和好友对话
|
// 判断当前是否正在和好友对话
|
||||||
@ -180,42 +169,10 @@ class Talk extends Base {
|
|||||||
let record = this.resource
|
let record = this.resource
|
||||||
|
|
||||||
// 群成员变化的消息,需要更新群成员列表
|
// 群成员变化的消息,需要更新群成员列表
|
||||||
if ([1102, 1103, 1104, 1115].includes(record.msg_type)) {
|
if ([1102, 1103, 1104].includes(record.msg_type)) {
|
||||||
useDialogueStore().updateGroupMembers()
|
useDialogueStore().updateGroupMembers()
|
||||||
}
|
}
|
||||||
|
|
||||||
//群解散时,需要更新群成员权限
|
|
||||||
if ([1106].includes(record.msg_type)) {
|
|
||||||
useDialogueStore().updateDismiss(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
//群成员被移出时,需要更新群成员权限
|
|
||||||
if ([1104, 1115].includes(record.msg_type)) {
|
|
||||||
if (this.resource?.extra?.members?.length > 0) {
|
|
||||||
const isMeQuit = this.resource.extra.members.find(
|
|
||||||
(item) => item.user_id === this.getAccountId()
|
|
||||||
)
|
|
||||||
if (isMeQuit) {
|
|
||||||
useDialogueStore().updateQuit(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 群信息变更时,需要更新群信息
|
|
||||||
if ([1116].includes(record.msg_type)) {
|
|
||||||
// 更新会话信息
|
|
||||||
useDialogueStore().updateDialogueTalk({
|
|
||||||
username: record.extra.group_name,
|
|
||||||
avatar: record.extra.group_avatar
|
|
||||||
})
|
|
||||||
//更新会话列表中的会话信息
|
|
||||||
useTalkStore().updateItem({
|
|
||||||
index_name: this.getIndexName(),
|
|
||||||
name: record.extra.group_name,
|
|
||||||
avatar: record.extra.group_avatar
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
useDialogueStore().addDialogueRecord(formatTalkRecord(this.getAccountId(), this.resource))
|
useDialogueStore().addDialogueRecord(formatTalkRecord(this.getAccountId(), this.resource))
|
||||||
|
|
||||||
if (!this.isCurrSender()) {
|
if (!this.isCurrSender()) {
|
||||||
@ -264,21 +221,6 @@ 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 === 1 && this.resource?.extra?.mentions?.length > 0) {
|
|
||||||
const findMention = this.resource?.extra?.mentions?.find(
|
|
||||||
(mention) => mention === this.getAccountId()
|
|
||||||
)
|
|
||||||
//有人@我或者@所有人,则更新会话列表
|
|
||||||
if (findMention || this.resource?.extra?.mentions?.includes(0)) {
|
|
||||||
// useTalkStore().loadTalkList()
|
|
||||||
useTalkStore().updateItem({
|
|
||||||
index_name: this.getIndexName(),
|
|
||||||
msg_text: this.getTalkText(),
|
|
||||||
atsign_num: 1
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,9 +14,8 @@ interface Params {
|
|||||||
interface SpecialParams extends Params {
|
interface SpecialParams extends Params {
|
||||||
msg_id?: string
|
msg_id?: string
|
||||||
cursor?: number
|
cursor?: number
|
||||||
direction?: 'up' | 'down'
|
direction?: 'up' | 'down',
|
||||||
sort_sequence?: string
|
sort_sequence?: string
|
||||||
type?: 'loadMore'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LoadOptions {
|
interface LoadOptions {
|
||||||
@ -39,11 +38,7 @@ export const useTalkRecord = (uid: number) => {
|
|||||||
talk_type: 0,
|
talk_type: 0,
|
||||||
status: 0,
|
status: 0,
|
||||||
cursor: 0,
|
cursor: 0,
|
||||||
specialParams: undefined as SpecialParams | undefined,
|
specialParams: undefined as SpecialParams | undefined
|
||||||
isLocatingMessage: false,
|
|
||||||
isLoadingMore: false,
|
|
||||||
lastLoadMoreTime: 0,
|
|
||||||
targetMessagePosition: 0
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 重置 loadConfig
|
// 重置 loadConfig
|
||||||
@ -142,11 +137,6 @@ export const useTalkRecord = (uid: number) => {
|
|||||||
|
|
||||||
if (el) {
|
if (el) {
|
||||||
if (request.cursor == 0) {
|
if (request.cursor == 0) {
|
||||||
// el.scrollTop = el.scrollHeight
|
|
||||||
|
|
||||||
// setTimeout(() => {
|
|
||||||
// el.scrollTop = el.scrollHeight + 1000
|
|
||||||
// }, 500)
|
|
||||||
scrollToBottom()
|
scrollToBottom()
|
||||||
} else {
|
} else {
|
||||||
el.scrollTop = el.scrollHeight - scrollHeight
|
el.scrollTop = el.scrollHeight - scrollHeight
|
||||||
@ -163,13 +153,13 @@ export const useTalkRecord = (uid: number) => {
|
|||||||
const getMinSequence = () => {
|
const getMinSequence = () => {
|
||||||
console.error('records.value', records.value)
|
console.error('records.value', records.value)
|
||||||
if (!records.value.length) return 0
|
if (!records.value.length) return 0
|
||||||
console.error(Math.min(...records.value.map((item) => item.sequence)))
|
console.error(Math.min(...records.value.map(item => item.sequence)))
|
||||||
return Math.min(...records.value.map((item) => item.sequence))
|
return Math.min(...records.value.map(item => item.sequence))
|
||||||
}
|
}
|
||||||
// 获取当前消息的最大 sequence
|
// 获取当前消息的最大 sequence
|
||||||
const getMaxSequence = () => {
|
const getMaxSequence = () => {
|
||||||
if (!records.value.length) return 0
|
if (!records.value.length) return 0
|
||||||
return Math.max(...records.value.map((item) => item.sequence))
|
return Math.max(...records.value.map(item => item.sequence))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -179,10 +169,7 @@ export const useTalkRecord = (uid: number) => {
|
|||||||
*/
|
*/
|
||||||
const onLoad = (params: Params, options?: LoadOptions) => {
|
const onLoad = (params: Params, options?: LoadOptions) => {
|
||||||
// 如果会话切换,重置所有状态
|
// 如果会话切换,重置所有状态
|
||||||
if (
|
if (params.talk_type !== loadConfig.talk_type || params.receiver_id !== loadConfig.receiver_id) {
|
||||||
params.talk_type !== loadConfig.talk_type ||
|
|
||||||
params.receiver_id !== loadConfig.receiver_id
|
|
||||||
) {
|
|
||||||
resetLoadConfig()
|
resetLoadConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,68 +189,34 @@ export const useTalkRecord = (uid: number) => {
|
|||||||
...params,
|
...params,
|
||||||
...options.specifiedMsg
|
...options.specifiedMsg
|
||||||
}
|
}
|
||||||
//msg_id是用来做定位的,不做参数,所以这里清空
|
|
||||||
contextParams.msg_id = ''
|
|
||||||
ServeTalkRecords(contextParams).then(({ data, code }) => {
|
ServeTalkRecords(contextParams).then(({ data, code }) => {
|
||||||
if (code !== 200) {
|
if (code !== 200) {
|
||||||
loadConfig.status = 2
|
loadConfig.status = 2
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 记录当前滚动高度
|
// dialogueStore.clearDialogueRecord()
|
||||||
const el = document.getElementById('imChatPanel')
|
|
||||||
const scrollHeight = el?.scrollHeight || 0
|
|
||||||
|
|
||||||
if (contextParams.direction === 'down' && !contextParams.type) {
|
|
||||||
dialogueStore.clearDialogueRecord()
|
|
||||||
}
|
|
||||||
const items = (data.items || []).map((item: ITalkRecord) => formatTalkRecord(uid, item))
|
const items = (data.items || []).map((item: ITalkRecord) => formatTalkRecord(uid, item))
|
||||||
if (contextParams.type && contextParams.type === 'loadMore') {
|
dialogueStore.unshiftDialogueRecord(contextParams.direction === 'down' ? items : items.reverse())
|
||||||
dialogueStore.addDialogueRecordForLoadMore(items)
|
loadConfig.status = items.length >= contextParams.limit ? 1 : 2
|
||||||
} else {
|
|
||||||
dialogueStore.unshiftDialogueRecord(
|
|
||||||
contextParams.direction === 'down' ? items : items.reverse()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
contextParams.direction === 'up' ||
|
|
||||||
(contextParams.direction === 'down' && !contextParams.type)
|
|
||||||
) {
|
|
||||||
loadConfig.status = items[0].sequence == 1 || data.length === 0 ? 2 : 1
|
|
||||||
}
|
|
||||||
loadConfig.cursor = data.cursor
|
loadConfig.cursor = data.cursor
|
||||||
|
nextTick(() => {
|
||||||
// 使用 requestAnimationFrame 来确保在下一帧渲染前设置滚动位置
|
setTimeout(() => {
|
||||||
requestAnimationFrame(() => {
|
const el = document.getElementById('imChatPanel')
|
||||||
const el = document.getElementById('imChatPanel')
|
const target = document.getElementById(options.specifiedMsg?.msg_id || '')
|
||||||
const target = document.getElementById(options.specifiedMsg?.msg_id || '')
|
if (el && target) {
|
||||||
if (el && target) {
|
|
||||||
// 如果是向上加载更多,保持原有内容位置
|
|
||||||
if (contextParams.direction === 'up') {
|
|
||||||
el.scrollTop = el.scrollHeight - scrollHeight
|
|
||||||
} else if (contextParams.type && contextParams.type === 'loadMore') {
|
|
||||||
// 如果是向下加载更多,保持目标消息在可视区域底部
|
|
||||||
// 使用可视区域高度来调整,而不是新内容的总高度
|
|
||||||
nextTick(() => {
|
|
||||||
if (el) {
|
|
||||||
el.scrollTop = scrollHeight - el.clientHeight
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
// 如果是定位到特定消息,计算并滚动到目标位置
|
|
||||||
const containerRect = el.getBoundingClientRect()
|
const containerRect = el.getBoundingClientRect()
|
||||||
const targetRect = target.getBoundingClientRect()
|
const targetRect = target.getBoundingClientRect()
|
||||||
const offset = targetRect.top - containerRect.top
|
const offset = targetRect.top - containerRect.top
|
||||||
loadConfig.isLocatingMessage = true
|
|
||||||
// 居中
|
// 居中
|
||||||
const scrollTo = el.scrollTop + offset - el.clientHeight / 2 + target.clientHeight / 2
|
const scrollTo = el.scrollTop + offset - el.clientHeight / 2 + target.clientHeight / 2
|
||||||
el.scrollTo({ top: scrollTo, behavior: 'smooth' })
|
el.scrollTo({ top: scrollTo, behavior: 'smooth' })
|
||||||
|
|
||||||
addClass(target, 'border')
|
addClass(target, 'border')
|
||||||
setTimeout(() => removeClass(target, 'border'), 3000)
|
setTimeout(() => removeClass(target, 'border'), 3000)
|
||||||
|
} else if (el) {
|
||||||
|
scrollToBottom()
|
||||||
}
|
}
|
||||||
} else if (el) {
|
}, 50)
|
||||||
// el.scrollTop = el.scrollHeight
|
|
||||||
scrollToBottom()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@ -282,10 +235,8 @@ export const useTalkRecord = (uid: number) => {
|
|||||||
// 判断是否是特殊参数模式
|
// 判断是否是特殊参数模式
|
||||||
if (loadConfig.specialParams && typeof loadConfig.specialParams === 'object') {
|
if (loadConfig.specialParams && typeof loadConfig.specialParams === 'object') {
|
||||||
// 检查特殊参数是否与当前会话匹配
|
// 检查特殊参数是否与当前会话匹配
|
||||||
if (
|
if (loadConfig.specialParams.talk_type === loadConfig.talk_type &&
|
||||||
loadConfig.specialParams.talk_type === loadConfig.talk_type &&
|
loadConfig.specialParams.receiver_id === loadConfig.receiver_id) {
|
||||||
loadConfig.specialParams.receiver_id === loadConfig.receiver_id
|
|
||||||
) {
|
|
||||||
// 特殊参数模式下,direction: 'up',cursor: 当前最小 sequence
|
// 特殊参数模式下,direction: 'up',cursor: 当前最小 sequence
|
||||||
onLoad(
|
onLoad(
|
||||||
{
|
{
|
||||||
@ -298,11 +249,7 @@ export const useTalkRecord = (uid: number) => {
|
|||||||
...loadConfig.specialParams,
|
...loadConfig.specialParams,
|
||||||
direction: 'up',
|
direction: 'up',
|
||||||
sort_sequence: '',
|
sort_sequence: '',
|
||||||
cursor: getMinSequence(),
|
cursor: getMinSequence()
|
||||||
msg_id:
|
|
||||||
records.value.find((item) =>
|
|
||||||
item.sequence === getMinSequence() ? item.msg_id : ''
|
|
||||||
)?.msg_id || ''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -326,33 +273,13 @@ export const useTalkRecord = (uid: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 向下加载更多(特殊参数模式才生效,普通模式无效,因为普通模式的数据就是从最新开始加载历史的,所以不需要加载更新的数据)
|
// 向下加载更多(兼容特殊参数模式)
|
||||||
const onLoadMoreDown = () => {
|
const onLoadMoreDown = () => {
|
||||||
// 判断是否是特殊参数模式
|
// 判断是否是特殊参数模式
|
||||||
if (loadConfig.specialParams && typeof loadConfig.specialParams === 'object') {
|
if (loadConfig.specialParams && typeof loadConfig.specialParams === 'object') {
|
||||||
if (loadConfig.isLocatingMessage) {
|
|
||||||
loadConfig.isLocatingMessage = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 添加时间间隔限制,至少间隔 500ms 才能触发下一次加载
|
|
||||||
const now = Date.now()
|
|
||||||
if (now - loadConfig.lastLoadMoreTime < 500) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
loadConfig.lastLoadMoreTime = now
|
|
||||||
|
|
||||||
// 记录当前目标消息的位置
|
|
||||||
const el = document.getElementById('imChatPanel')
|
|
||||||
if (el) {
|
|
||||||
loadConfig.targetMessagePosition = el.scrollHeight - el.scrollTop
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('onLoadMoreDown 特殊模式触底了')
|
|
||||||
// 检查特殊参数是否与当前会话匹配
|
// 检查特殊参数是否与当前会话匹配
|
||||||
if (
|
if (loadConfig.specialParams.talk_type === loadConfig.talk_type &&
|
||||||
loadConfig.specialParams.talk_type === loadConfig.talk_type &&
|
loadConfig.specialParams.receiver_id === loadConfig.receiver_id) {
|
||||||
loadConfig.specialParams.receiver_id === loadConfig.receiver_id
|
|
||||||
) {
|
|
||||||
onLoad(
|
onLoad(
|
||||||
{
|
{
|
||||||
receiver_id: loadConfig.receiver_id,
|
receiver_id: loadConfig.receiver_id,
|
||||||
@ -363,23 +290,27 @@ export const useTalkRecord = (uid: number) => {
|
|||||||
specifiedMsg: {
|
specifiedMsg: {
|
||||||
...loadConfig.specialParams,
|
...loadConfig.specialParams,
|
||||||
direction: 'down',
|
direction: 'down',
|
||||||
sort_sequence: 'asc',
|
cursor: getMaxSequence()
|
||||||
cursor: getMaxSequence(),
|
|
||||||
type: 'loadMore'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
// 如果不匹配,重置为普通模式
|
||||||
|
resetLoadConfig()
|
||||||
|
load({
|
||||||
|
receiver_id: loadConfig.receiver_id,
|
||||||
|
talk_type: loadConfig.talk_type,
|
||||||
|
limit: 30
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
load({
|
||||||
|
receiver_id: loadConfig.receiver_id,
|
||||||
|
talk_type: loadConfig.talk_type,
|
||||||
|
limit: 30
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return { loadConfig, records, onLoad, onRefreshLoad, onLoadMoreDown, onJumpMessage, resetLoadConfig }
|
||||||
loadConfig,
|
|
||||||
records,
|
|
||||||
onLoad,
|
|
||||||
onRefreshLoad,
|
|
||||||
onLoadMoreDown,
|
|
||||||
onJumpMessage,
|
|
||||||
resetLoadConfig
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -49,12 +49,6 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
// 是否显示编辑器
|
// 是否显示编辑器
|
||||||
isShowEditor: false,
|
isShowEditor: false,
|
||||||
|
|
||||||
//是否已被解散
|
|
||||||
isDismiss: false,
|
|
||||||
|
|
||||||
//是否退群/移出群
|
|
||||||
isQuit: false,
|
|
||||||
|
|
||||||
// 是否显示会话列表
|
// 是否显示会话列表
|
||||||
isShowSessionList: true,
|
isShowSessionList: true,
|
||||||
groupInfo: {} ,
|
groupInfo: {} ,
|
||||||
@ -86,16 +80,6 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
this.online = status
|
this.online = status
|
||||||
},
|
},
|
||||||
|
|
||||||
// 更新群解散状态
|
|
||||||
updateDismiss(isDismiss) {
|
|
||||||
this.isDismiss = isDismiss
|
|
||||||
},
|
|
||||||
|
|
||||||
// 更新群成员退出状态
|
|
||||||
updateQuit(isQuit) {
|
|
||||||
this.isQuit = isQuit
|
|
||||||
},
|
|
||||||
|
|
||||||
// 更新对话信息
|
// 更新对话信息
|
||||||
setDialogue(data = {}) {
|
setDialogue(data = {}) {
|
||||||
this.online = data.is_online == 1
|
this.online = data.is_online == 1
|
||||||
@ -111,9 +95,6 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
this.records = []
|
this.records = []
|
||||||
this.unreadBubble = 0
|
this.unreadBubble = 0
|
||||||
this.isShowEditor = data?.is_robot === 0
|
this.isShowEditor = data?.is_robot === 0
|
||||||
|
|
||||||
this.isDismiss = data?.is_dismiss === 1 ? true : false
|
|
||||||
this.isQuit = data?.is_quit === 1 ? true : false
|
|
||||||
|
|
||||||
// 只在手动切换会话时清空 specifiedMsg
|
// 只在手动切换会话时清空 specifiedMsg
|
||||||
// if (this.isManualSwitch) {
|
// if (this.isManualSwitch) {
|
||||||
@ -170,10 +151,6 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
unshiftDialogueRecord(records) {
|
unshiftDialogueRecord(records) {
|
||||||
this.records.unshift(...records)
|
this.records.unshift(...records)
|
||||||
},
|
},
|
||||||
//数组尾部加入更多对话记录
|
|
||||||
addDialogueRecordForLoadMore(records){
|
|
||||||
this.records.push(...records)
|
|
||||||
},
|
|
||||||
async getGroupInfo(){
|
async getGroupInfo(){
|
||||||
const { code, data } = await ServeGroupDetail({
|
const { code, data } = await ServeGroupDetail({
|
||||||
group_id: this.talk.receiver_id
|
group_id: this.talk.receiver_id
|
||||||
@ -311,11 +288,6 @@ export const useDialogueStore = defineStore('dialogue', {
|
|||||||
record.extra.url = videoInfo.url
|
record.extra.url = videoInfo.url
|
||||||
// record.extra.cover = videoInfo.cover
|
// record.extra.cover = videoInfo.cover
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
// 更新会话信息
|
|
||||||
updateDialogueTalk(params){
|
|
||||||
Object.assign(this.talk, params)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -50,8 +50,8 @@ export interface ITalkRecord {
|
|||||||
send_status: number
|
send_status: number
|
||||||
float: string,
|
float: string,
|
||||||
is_convert_text?:number//语音记录的 是否是在展示转文本状态 1:是 0:否,
|
is_convert_text?:number//语音记录的 是否是在展示转文本状态 1:是 0:否,
|
||||||
erp_user_id:number,
|
erp_user_id:number
|
||||||
read_total_num:number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ITalkRecordExtraText {
|
export interface ITalkRecordExtraText {
|
||||||
|
@ -39,8 +39,6 @@ export function formatTalkItem(params) {
|
|||||||
is_top: 0,
|
is_top: 0,
|
||||||
is_online: 0,
|
is_online: 0,
|
||||||
is_robot: 0,
|
is_robot: 0,
|
||||||
is_dismiss: 0,
|
|
||||||
is_quit: 0,
|
|
||||||
unread_num: 0,
|
unread_num: 0,
|
||||||
content: '......',
|
content: '......',
|
||||||
draft_text: '',
|
draft_text: '',
|
||||||
|
@ -481,12 +481,6 @@ const onDatePickShow = (show) => {
|
|||||||
// state.nowDateTime = new Date()
|
// state.nowDateTime = new Date()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 隐藏搜索结果模态框
|
|
||||||
const hideSearchResultModal = () => {
|
|
||||||
handleSearchRecordByConditionModalClose()
|
|
||||||
state.isShowGroupAside = false
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -512,7 +506,6 @@ const hideSearchResultModal = () => {
|
|||||||
:receiver_id="talkParams.receiver_id"
|
:receiver_id="talkParams.receiver_id"
|
||||||
:index_name="talkParams.index_name"
|
:index_name="talkParams.index_name"
|
||||||
:specifiedMsg="talkParams.specifiedMsg"
|
:specifiedMsg="talkParams.specifiedMsg"
|
||||||
:num="talkParams.num"
|
|
||||||
/>
|
/>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
@ -713,7 +706,6 @@ const hideSearchResultModal = () => {
|
|||||||
@getDisabledDateArray="getDisabledDateArray"
|
@getDisabledDateArray="getDisabledDateArray"
|
||||||
:selectedDateTime="state.selectedDateTime"
|
:selectedDateTime="state.selectedDateTime"
|
||||||
:nowDateTime="state.nowDateTime"
|
:nowDateTime="state.nowDateTime"
|
||||||
@hideSearchResultModal="hideSearchResultModal"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</n-card>
|
</n-card>
|
||||||
|
@ -74,24 +74,6 @@ const renderChatAppSearch = () => {
|
|||||||
console.log(searchText, searchResultKey, talk_type, receiver_id)
|
console.log(searchText, searchResultKey, talk_type, receiver_id)
|
||||||
const result = JSON.parse(decodeURIComponent(res))
|
const result = JSON.parse(decodeURIComponent(res))
|
||||||
console.log(result)
|
console.log(result)
|
||||||
if (searchResultKey === 'general_infos') {
|
|
||||||
state.ServeQueryTalkRecordParams = encodeURIComponent(
|
|
||||||
JSON.stringify({
|
|
||||||
talk_type: 0, //1私聊2群聊
|
|
||||||
receiver_id: 0, //查详情的时候需传入
|
|
||||||
last_group_id: 0, //最后一条群id
|
|
||||||
last_member_id: 0, //最后一条用户id
|
|
||||||
last_receiver_user_name: '', //最后一条用户名
|
|
||||||
last_receiver_group_name: '' //最后一条群名
|
|
||||||
})
|
|
||||||
)
|
|
||||||
state.isShowSearchRecordModal = true
|
|
||||||
state.searchRecordText = searchText
|
|
||||||
state.selectItemInList = res
|
|
||||||
} else {
|
|
||||||
talkStore.toTalk(talk_type, receiver_id, router)
|
|
||||||
}
|
|
||||||
state.showSearchDropdown = false
|
|
||||||
},
|
},
|
||||||
onToMoreResultPage: (searchResultKey, searchText) => {
|
onToMoreResultPage: (searchResultKey, searchText) => {
|
||||||
if (searchResultKey === 'general_infos') {
|
if (searchResultKey === 'general_infos') {
|
||||||
@ -106,10 +88,8 @@ const renderChatAppSearch = () => {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
state.isShowSearchRecordModal = true
|
state.isShowSearchRecordModal = true
|
||||||
state.searchRecordText = searchText
|
|
||||||
}
|
}
|
||||||
console.log(searchResultKey, searchText)
|
console.log(searchResultKey, searchText)
|
||||||
state.showSearchDropdown = false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -297,9 +277,7 @@ const state = reactive({
|
|||||||
apiParams: '',
|
apiParams: '',
|
||||||
lastId: undefined as any,
|
lastId: undefined as any,
|
||||||
total: 0
|
total: 0
|
||||||
},
|
}
|
||||||
showSearchDropdown: false, // 是否显示搜索下拉框
|
|
||||||
selectItemInList: '' // 在列表选中的聊天记录搜索项
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const items = computed((): ISession[] => {
|
const items = computed((): ISession[] => {
|
||||||
@ -314,9 +292,9 @@ const items = computed((): ISession[] => {
|
|||||||
|
|
||||||
// 置顶和非置顶分组
|
// 置顶和非置顶分组
|
||||||
const topItems = filtered
|
const topItems = filtered
|
||||||
.filter((item) => item.is_top === 1)
|
.filter(item => item.is_top === 1)
|
||||||
.sort((a, b) => new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime())
|
.sort((a, b) => new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime())
|
||||||
const normalItems = filtered.filter((item) => item.is_top !== 1)
|
const normalItems = filtered.filter(item => item.is_top !== 1)
|
||||||
|
|
||||||
return [...topItems, ...normalItems]
|
return [...topItems, ...normalItems]
|
||||||
})
|
})
|
||||||
@ -401,8 +379,7 @@ const onTabTalk = (item: ISession, follow = false) => {
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
talkStore.updateItem({
|
talkStore.updateItem({
|
||||||
index_name: item.index_name,
|
index_name: item.index_name,
|
||||||
unread_num: 0,
|
unread_num: 0
|
||||||
atsign_num: 0
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -612,8 +589,8 @@ const handleGroupChatListPaginationSize = (value) => {
|
|||||||
//处理搜索聊天记录点击
|
//处理搜索聊天记录点击
|
||||||
const handleClickSearchItem = (searchText, searchResultKey, talk_type, receiver_id, res) => {
|
const handleClickSearchItem = (searchText, searchResultKey, talk_type, receiver_id, res) => {
|
||||||
console.log(searchText, searchResultKey, talk_type, receiver_id)
|
console.log(searchText, searchResultKey, talk_type, receiver_id)
|
||||||
// const result = JSON.parse(decodeURIComponent(res))
|
const result = JSON.parse(decodeURIComponent(res))
|
||||||
// console.log(result)
|
console.log(result)
|
||||||
if (searchResultKey === 'general_infos') {
|
if (searchResultKey === 'general_infos') {
|
||||||
// 先清空右侧
|
// 先清空右侧
|
||||||
state.isShowSearchRecordDetailInfo = false
|
state.isShowSearchRecordDetailInfo = false
|
||||||
@ -651,9 +628,6 @@ const handleClickSearchResultItem = (searchText, searchResultKey, talk_type, rec
|
|||||||
)
|
)
|
||||||
console.error(dialogueStore.specifiedMsg, 'dialogueStore.specifiedMsg')
|
console.error(dialogueStore.specifiedMsg, 'dialogueStore.specifiedMsg')
|
||||||
talkStore.toTalk(talk_type, receiver_id, router)
|
talkStore.toTalk(talk_type, receiver_id, router)
|
||||||
state.isShowSearchRecordModal = false
|
|
||||||
state.searchRecordText = ''
|
|
||||||
searchKeyword.value = ''
|
|
||||||
}
|
}
|
||||||
//处理点击停留item变化
|
//处理点击停留item变化
|
||||||
const handleClickStayItemChange = (item) => {
|
const handleClickStayItemChange = (item) => {
|
||||||
@ -748,26 +722,24 @@ const handleEnterSearchResultChat = () => {
|
|||||||
trigger="click"
|
trigger="click"
|
||||||
:options="state.chatSearchOptions"
|
:options="state.chatSearchOptions"
|
||||||
style="width: 248px; height: 677px;"
|
style="width: 248px; height: 677px;"
|
||||||
:show="state.showSearchDropdown"
|
|
||||||
@clickoutside="state.showSearchDropdown = false"
|
|
||||||
>
|
>
|
||||||
<n-input
|
<n-input
|
||||||
placeholder="搜索好友 / 群聊"
|
placeholder="搜索好友 / 群聊"
|
||||||
v-model:value.trim="searchKeyword"
|
v-model:value.trim="searchKeyword"
|
||||||
|
round
|
||||||
clearable
|
clearable
|
||||||
style="width: 78%;"
|
style="width: 78%;"
|
||||||
@click="state.showSearchDropdown = true"
|
|
||||||
>
|
>
|
||||||
<!-- <template #prefix>
|
<template #prefix>
|
||||||
<n-icon :component="Search" />
|
<n-icon :component="Search" />
|
||||||
</template> -->
|
</template>
|
||||||
</n-input>
|
</n-input>
|
||||||
</n-dropdown>
|
</n-dropdown>
|
||||||
<!-- <n-button circle @click="isShowGroup = true">
|
<n-button circle @click="isShowGroup = true">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<n-icon :component="Plus" />
|
<n-icon :component="Plus" />
|
||||||
</template>
|
</template>
|
||||||
</n-button> -->
|
</n-button>
|
||||||
<img
|
<img
|
||||||
style="width: 19px; height: 20px; cursor: pointer;"
|
style="width: 19px; height: 20px; cursor: pointer;"
|
||||||
src="@/assets/image/chatList/addressBook.png"
|
src="@/assets/image/chatList/addressBook.png"
|
||||||
@ -978,7 +950,6 @@ const handleEnterSearchResultChat = () => {
|
|||||||
@clickStayItemChange="handleClickStayItemChange"
|
@clickStayItemChange="handleClickStayItemChange"
|
||||||
@lastIdChange="handleSearchListLastIdChange"
|
@lastIdChange="handleSearchListLastIdChange"
|
||||||
:searchResultMaxHeight="'517px'"
|
:searchResultMaxHeight="'517px'"
|
||||||
:selectItemInList="state.selectItemInList"
|
|
||||||
></chatAppSearchList>
|
></chatAppSearchList>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-record-detail">
|
<div class="search-record-detail">
|
||||||
|
@ -51,7 +51,6 @@ const labelColor=[
|
|||||||
<span class="detail" v-html="data.draft_text" />
|
<span class="detail" v-html="data.draft_text" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span class="draft" v-show="data.talk_type == 2 && data.atsign_num"> [有人@你] </span>
|
|
||||||
<span class="online" v-show="data.talk_type == 1 && data.is_online == 1"> [在线] </span>
|
<span class="online" v-show="data.talk_type == 1 && data.is_online == 1"> [在线] </span>
|
||||||
<span class="detail" v-html="data.msg_text" />
|
<span class="detail" v-html="data.msg_text" />
|
||||||
</template>
|
</template>
|
||||||
|
@ -19,7 +19,7 @@ defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
avatar: {
|
avatar:{
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
@ -46,22 +46,19 @@ const onSetMenu = () => {
|
|||||||
/>
|
/>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<avatarModule
|
<avatarModule class="mr-10px" :mode="dialogueStore.talk.talk_type"
|
||||||
class="mr-10px"
|
:avatar="avatar"
|
||||||
:mode="dialogueStore.talk.talk_type"
|
:groupType="dialogueStore.talk?.group_type"
|
||||||
:avatar="avatar"
|
:userName="username" :customStyle="{width:'42px',height:'42px'}"></avatarModule>
|
||||||
:groupType="dialogueStore.talk?.group_type"
|
|
||||||
:userName="username"
|
|
||||||
:customStyle="{ width: '42px', height: '42px' }"
|
|
||||||
></avatarModule>
|
|
||||||
<div class="module left-module">
|
<div class="module left-module">
|
||||||
<!-- <span class="tag" :class="{ red: type == 1 }">
|
<!-- <span class="tag" :class="{ red: type == 1 }">
|
||||||
{{ type == 1 ? '好友' : '群聊' }}
|
{{ type == 1 ? '好友' : '群聊' }}
|
||||||
</span> -->
|
</span> -->
|
||||||
<span class="nickname">{{ username }}</span>
|
<span class="nickname">{{ username }}</span>
|
||||||
<span class="num" v-show="type == 2 && num">({{ num }})</span>
|
<span class="num" v-show="type == 2 && num">({{ num }})</span>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="module center-module" v-if="type == 1">
|
<div class="module center-module" v-if="type == 1">
|
||||||
<p class="online">
|
<p class="online">
|
||||||
@ -83,13 +80,8 @@ const onSetMenu = () => {
|
|||||||
:size="18"
|
:size="18"
|
||||||
class="icon"
|
class="icon"
|
||||||
@click="emit('evnet', 'group')"
|
@click="emit('evnet', 'group')"
|
||||||
v-show="!dialogueStore.isDismiss && !dialogueStore.isQuit"
|
|
||||||
>
|
>
|
||||||
<img
|
<img style="width: 20px; height: 20px;" src="@/assets/image/chatList/chat-settings.png" alt="" />
|
||||||
style="width: 20px; height: 20px;"
|
|
||||||
src="@/assets/image/chatList/chat-settings.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</n-icon>
|
</n-icon>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@ -164,7 +156,7 @@ const onSetMenu = () => {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
&.color {
|
&.color {
|
||||||
color: #462aa0;
|
color: #462AA0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.online-status {
|
.online-status {
|
||||||
@ -176,7 +168,7 @@ const onSetMenu = () => {
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #462aa0;
|
background-color: #462AA0;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
@ -185,7 +177,7 @@ const onSetMenu = () => {
|
|||||||
left: -1px;
|
left: -1px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: 1px solid #462aa0;
|
border: 1px solid #462AA0;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
-webkit-animation: antStatusProcessing 1.2s ease-in-out infinite;
|
-webkit-animation: antStatusProcessing 1.2s ease-in-out infinite;
|
||||||
animation: antStatusProcessing 1.2s ease-in-out infinite;
|
animation: antStatusProcessing 1.2s ease-in-out infinite;
|
||||||
|
Loading…
Reference in New Issue
Block a user