Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a8fea9ea32 | ||
|
62cb9c87c2 | ||
445f8f2e79 | |||
2a1917942d |
@ -109,3 +109,13 @@ export const ServeAddFriend = (data) => {
|
||||
export const ServeCheckFriend = (data) => {
|
||||
return post('/api/v1/contact/friend/check', data)
|
||||
}
|
||||
|
||||
// 检测是否需要加好友
|
||||
export const GetContactFriendList = (data) => {
|
||||
return post('/api/v1/contact/friend/list', data)
|
||||
}
|
||||
|
||||
// 搜索好友
|
||||
export const GetFriendList = (data) => {
|
||||
return post('/api/v1/contact/friend/search', data)
|
||||
}
|
@ -33,7 +33,6 @@ const props = defineProps({
|
||||
const emit = defineEmits(['editor-event'])
|
||||
const userStore = useUserStore()
|
||||
const dialogueStore = useDialogueStore()
|
||||
console.log('dialogueStore', dialogueStore.talk.talk_type)
|
||||
const editorDraftStore = useEditorDraftStore()
|
||||
const editorRef = ref(null)
|
||||
const content = ref('')
|
||||
@ -172,7 +171,6 @@ const updateMentionPosition = (range) => {
|
||||
}
|
||||
}
|
||||
const insertMention = (member, clonedRange) => {
|
||||
console.log('插入mention', member);
|
||||
const selection = window.getSelection();
|
||||
if (!clonedRange || !selection || !editorRef.value) return;
|
||||
const range = clonedRange;
|
||||
@ -565,20 +563,20 @@ const parseEditorContent = () => {
|
||||
currentTextBuffer += '\n';
|
||||
break;
|
||||
case 'IMG':
|
||||
flushTextBufferIfNeeded();
|
||||
const src = node.getAttribute('src');
|
||||
const alt = node.getAttribute('alt');
|
||||
const isEmojiPic = node.classList.contains('editor-emoji');
|
||||
const isTextEmojiPlaceholder = node.classList.contains('emoji');
|
||||
if (isTextEmojiPlaceholder && alt) {
|
||||
if ((isEmojiPic || isTextEmojiPlaceholder) && alt) {
|
||||
currentTextBuffer += alt;
|
||||
} else if (src) {
|
||||
flushTextBufferIfNeeded();
|
||||
items.push({
|
||||
type: 3,
|
||||
content: src,
|
||||
isEmoji: isEmojiPic,
|
||||
width: node.getAttribute('data-original-width') || node.width || null,
|
||||
height: node.getAttribute('data-original-height') || node.height || null,
|
||||
isEmoji: false,
|
||||
width: node.getAttribute('data-original-width') || node.width,
|
||||
height: node.getAttribute('data-original-height') || node.height
|
||||
});
|
||||
}
|
||||
break;
|
||||
@ -887,12 +885,8 @@ const insertImageEmoji = (imgSrc, altText) => {
|
||||
img.className = 'editor-emoji';
|
||||
img.setAttribute('data-role', 'emoji');
|
||||
range.insertNode(img);
|
||||
const spaceNode = document.createTextNode('\u00A0');
|
||||
range.setStartAfter(img);
|
||||
range.collapse(true);
|
||||
range.insertNode(spaceNode);
|
||||
range.setStartAfter(spaceNode);
|
||||
range.collapse(true);
|
||||
if (selection) {
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
|
@ -26,7 +26,7 @@ import {
|
||||
import { Search, Plus, Right, AddOne, PeoplePlusOne } from '@icon-park/vue-next'
|
||||
import TalkItem from './TalkItem.vue'
|
||||
import Skeleton from './Skeleton.vue'
|
||||
import { ServeClearTalkUnreadNum, ServeAddFriend } from '@/api/chat'
|
||||
import { ServeClearTalkUnreadNum, ServeAddFriend, GetFriendList } from '@/api/chat'
|
||||
import GroupLaunch from '@/components/group/GroupLaunch.vue'
|
||||
import { getCacheIndexName } from '@/utils/talk'
|
||||
import { ISession } from '@/types/chat'
|
||||
@ -38,6 +38,7 @@ import flTree from '@/components/flnlayout/tree/flnindex.vue'
|
||||
import { processError, processSuccess } from '@/utils/helper/message.js'
|
||||
import chatAppSearchList from '@/components/search/searchList.vue'
|
||||
import { ServeSeachQueryAll, ServeQueryTalkRecord, ServeUserGroupChatList } from '@/api/search'
|
||||
import { GetContactFriendList } from '@/api/chat'
|
||||
import { getUserInfoByERPUserId } from '@/api/user'
|
||||
import HighlightText from '@/components/search/highLightText.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@ -736,8 +737,8 @@ const getMyFriends = () => {
|
||||
page_size: state.myFriendListPageSize,
|
||||
name: state.myFriendListSearchName
|
||||
}
|
||||
let url = '/api/v1/contact/friend/list'
|
||||
$request.HTTP.components.postDataByParams(url, params).then((res) => {
|
||||
// let url = '/api/v1/contact/friend/list'
|
||||
GetContactFriendList(params).then((res) => {
|
||||
// console.log(res)
|
||||
if (res.code === 200 && Array.isArray(res.data.user_list)) {
|
||||
state.myFriendListData = res.data.user_list || []
|
||||
@ -749,7 +750,7 @@ const getMyFriends = () => {
|
||||
// 获取部门下的人员
|
||||
const getDepPoisUser = () => {
|
||||
// let url = '/user/v2/list'
|
||||
let url = '/api/v1/contact/friend/list'
|
||||
// let url = '/api/v1/contact/friend/list'
|
||||
// let params = {
|
||||
// departmentId: state.addressBookSearchNickName ? undefined : state.clickKey,
|
||||
// page: state.addressBookPage,
|
||||
@ -770,7 +771,7 @@ const getDepPoisUser = () => {
|
||||
page_size: state.addressBookPageSize,
|
||||
name: state.addressBookSearchNickName
|
||||
}
|
||||
$request.HTTP.components.postDataByParams(url, params).then((res) => {
|
||||
GetContactFriendList(params).then((res) => {
|
||||
// console.log(res)
|
||||
if (res.code === 200 && Array.isArray(res.data.user_list)) {
|
||||
state.addressBookData = res.data.user_list || []
|
||||
@ -884,8 +885,8 @@ const changeAddFriendSearch = (value) => {
|
||||
let params = {
|
||||
name: value.friendName
|
||||
}
|
||||
let url = '/api/v1/contact/friend/search'
|
||||
$request.HTTP.components.postDataByParams(url, params).then((res) => {
|
||||
// let url = '/api/v1/contact/friend/search'
|
||||
GetFriendList(params).then((res) => {
|
||||
// console.log(res)
|
||||
if (res.code === 200) {
|
||||
state.addFriendList = res.data?.user_list || []
|
||||
|
Loading…
Reference in New Issue
Block a user