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 {
|
try {
|
||||||
const response = await post(`/team/bd/invite-bd-message-process`, data)
|
const response = await post(`/team/bd/invite-bd-cancel/${id}`)
|
||||||
return response
|
return response
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to handle invite:', error)
|
console.error('Failed to cancel invite:', error)
|
||||||
console.error('error:' + error.response.errorMsg)
|
console.error('error:' + error.response.errorMsg)
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|||||||
@ -195,7 +195,7 @@ import { searchUser } from '@/api/userInfo'
|
|||||||
import {
|
import {
|
||||||
invitedList, // 获取已邀请列表
|
invitedList, // 获取已邀请列表
|
||||||
inviteToBeBD, // 邀请代理
|
inviteToBeBD, // 邀请代理
|
||||||
handleInvite, // 处理邀请(取消邀请)
|
cancelInvite, // 处理邀请(取消邀请)
|
||||||
} from '@/api/bdLeaderCenter.js'
|
} from '@/api/bdLeaderCenter.js'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
|
|
||||||
@ -293,9 +293,8 @@ const getInvitedList = async () => {
|
|||||||
// 取消邀请
|
// 取消邀请
|
||||||
const cancelInviteAgency = async (userId) => {
|
const cancelInviteAgency = async (userId) => {
|
||||||
console.log('取消邀请用户id:', userId)
|
console.log('取消邀请用户id:', userId)
|
||||||
let data = { id: userId, status: 0 }
|
|
||||||
try {
|
try {
|
||||||
const resCancel = await handleInvite(data)
|
const resCancel = await cancelInvite(userId)
|
||||||
if (resCancel.status) {
|
if (resCancel.status) {
|
||||||
showSuccess('Cancel invitation successfully!')
|
showSuccess('Cancel invitation successfully!')
|
||||||
getInvitedList()
|
getInvitedList()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user