import request from '@/axios' import type { ChannelData } from './types' export const getChannelListApi = (params?: { name?: string pageIndex?: number pageSize?: number }): Promise> => { return request.get({ url: '/web/v1/channel/list', params }) } export const addChannelApi = (data: Partial): Promise => { return request.post({ url: '/web/v1/channel', data }) } export const editChannelApi = (data: Partial): Promise => { return request.put({ url: '/web/v1/channel', data }) } export const delChannelApi = (ids: string[]): Promise => { return request.post({ url: '/web/v1/channel/delete', data: { ids } }) }