Compare commits

..

5 Commits
main ... yink

5 changed files with 8706 additions and 104 deletions

2
env/.env.test vendored
View File

@ -7,6 +7,6 @@ VUE_APP_PREVIEW=false
#VITE_SOCKET_API=ws://192.168.88.21:9504
VITE_BASE_API=http://114.218.158.24:8503
VITE_SOCKET_API=ws://114.218.158.24:8504
VITE_EPR_BASEURL=http://114.218.158.24:9020
VITE_EPR_BASEURL=http://172.16.100.93:8503
VITE_PAGE_URL=http://172.16.100.93:9032
VUE_APP_WEBSITE_NAME=""

7356
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -146,7 +146,7 @@ watch(
ServeCheckFriend({ receiver_id: newValue.receiver_id, talk_type: 1 }).then((res) => {
if (res?.code === 200) {
console.log(res, 'ress')
isFriend.value = !res.data.is_friend
isFriend.value = res.data.is_friend
}
})
}
@ -537,7 +537,7 @@ const clearSelectedDateTime = () => {
<main class="el-main relative">
<div
class="p-[15px] pt-[10px] w-[100%] z-99 absolute"
v-if="isFriend && talkParams.type !== 2"
v-if="!isFriend && talkParams.type !== 2"
>
<div
class="bg-[#FFFFFF] w-[100%] p-[10px] text-[14px] flex justify-between"

View File

@ -3,7 +3,7 @@ import { watch, onMounted, ref, nextTick, onUnmounted } from 'vue'
import { NDropdown, NCheckbox, NPopover, NInfiniteScroll } from 'naive-ui'
import { Loading, MoreThree, ToTop } from '@icon-park/vue-next'
import { bus } from '@/utils/event-bus'
import { useDialogueStore } from '@/store'
import { useDialogueStore, useTalkStore } from '@/store'
import { formatTime, parseTime } from '@/utils/datetime'
import { clipboard, htmlDecode, clipboardImage } from '@/utils/common'
import { downloadImage } from '@/utils/functions'
@ -19,8 +19,11 @@ import RevokeMessage from '@/components/talk/message/RevokeMessage.vue'
import { voiceToText, ServeMessageReadDetail } from '@/api/chat.js'
import { confirmBox } from '@/components/confirm-box/service.js'
import ws from '@/connect'
import { useRouter } from 'vue-router'
import avatarModule from '@/components/avatar-module/index.vue'
const router = useRouter()
//
interface ReadStatus {
msg_ids: string[]
@ -86,11 +89,28 @@ const { dropdown, showDropdownMenu, closeDropdownMenu, isOneMonthBefore } = useM
const { showUserInfoModal } = useInject()
const dialogueStore = useDialogueStore()
const userStore = useUserStore()
const talkStore = useTalkStore()
// const showUserInfoModal = (uid: number) => {
// userStore.getUserInfo(uid)
// }
//
const skipBottom = ref(false)
const goToMessage = (result) => {
const talk_type = props.talk_type
const receiver_id = props.receiver_id
dialogueStore.specifiedMsg = encodeURIComponent(
JSON.stringify({
talk_type,
receiver_id,
msg_id: result.msg_id,
cursor: result.sequence - 15 > 0 ? result.sequence - 15 : 0,
direction: 'down',
sort_sequence: 'asc',
create_time: result.created_at
})
)
talkStore.toTalk(talk_type, receiver_id, router)
}
//
const isShowTalkTime = (index: number, datetime: string) => {
if (datetime == undefined) {
@ -330,15 +350,16 @@ const onContextMenuHandle = (key: string) => {
}
const onRowClick = (item: ITalkRecord) => {
if (dialogueStore.isOpenMultiSelect && isOneMonthBefore(item.created_at.split(' ')[0])) {
if (dialogueStore.isOpenMultiSelect) {
if (!isOneMonthBefore(item.created_at.split(' ')[0])) {
return useMessage.info('只支持转发近一个月内的消息')
}
console.log('item.msg_type', item.msg_type)
if (ForwardableMessageType.includes(item.msg_type)) {
item.isCheck = !item.isCheck
} else {
useMessage.info('此类消息不支持转发')
}
} else {
useMessage.info('只支持转发近一个月内的消息')
}
}
@ -907,11 +928,11 @@ const onCustomSkipBottomEvent = () => {
<n-icon class="more-tools pointer" :component="MoreThree" @click="onContextMenu($event, item)" />
</div> -->
</div>
<!-- @click="onJumpMessage(item.extra?.reply?.msg_id)" -->
<div
v-if="item.extra.reply"
class="talk-reply pointer"
@click="onJumpMessage(item.extra?.reply?.msg_id)"
@click="goToMessage(item.extra?.reply)"
>
<n-icon :component="ToTop" size="14" class="icon-top" />
<span class="ellipsis">
@ -1056,6 +1077,7 @@ const onCustomSkipBottomEvent = () => {
&.border {
border-radius: 10px;
border: 1px solid var(--im-primary-color);
background-color: red;
}
}