This commit is contained in:
Phoenix 2025-07-01 15:37:44 +08:00
commit a8fea9ea32
2 changed files with 18 additions and 7 deletions

View File

@ -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)
}

View File

@ -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 || []