feat(邀请BD页): 更新取消邀请接口

This commit is contained in:
hzj 2025-10-31 18:05:37 +08:00
parent 4c0f3153de
commit 6674120f1b
2 changed files with 5 additions and 6 deletions

View File

@ -25,12 +25,12 @@ export const inviteToBeBD = async (data) => {
}
// 处理邀请(取消邀请)
export const handleInvite = async (data) => {
export const cancelInvite = async (id) => {
try {
const response = await post(`/team/bd/invite-bd-message-process`, data)
const response = await post(`/team/bd/invite-bd-cancel/${id}`)
return response
} catch (error) {
console.error('Failed to handle invite:', error)
console.error('Failed to cancel invite:', error)
console.error('error:' + error.response.errorMsg)
throw error
}

View File

@ -195,7 +195,7 @@ import { searchUser } from '@/api/userInfo'
import {
invitedList, //
inviteToBeBD, //
handleInvite, // ()
cancelInvite, // ()
} from '@/api/bdLeaderCenter.js'
import { computed, onMounted, ref } from 'vue'
@ -293,9 +293,8 @@ const getInvitedList = async () => {
//
const cancelInviteAgency = async (userId) => {
console.log('取消邀请用户id:', userId)
let data = { id: userId, status: 0 }
try {
const resCancel = await handleInvite(data)
const resCancel = await cancelInvite(userId)
if (resCancel.status) {
showSuccess('Cancel invitation successfully!')
getInvitedList()