feat(邀请BD页): 更新取消邀请接口
This commit is contained in:
parent
4c0f3153de
commit
6674120f1b
@ -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
|
||||
}
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user