import { http } from '@/utils/http/axios'; /** * @description: 列表 */ export function getAdList(params?) { return http.request({ url: '/admin/ad/page', method: 'GET', params, }); } /** * @description: 根据ID获取详情 */ export function getAdDetail(adId) { return http.request({ url: '/admin/ad/detail/' + adId, method: 'get', }); } /** * @description: 添加 */ export function adAdd(data: any) { return http.request({ url: '/admin/ad/add', method: 'POST', data, }); } /** * @description: 更新 */ export function adUpdate(data: any) { return http.request({ url: '/admin/ad/update', method: 'PUT', data, }); } /** * @description: 删除 */ export function adDelete(adId) { return http.request({ url: '/admin/ad/delete/' + adId, method: 'DELETE', }); } /** * @description: 批量删除 */ export function adBatchDelete(data: any) { return http.request({ url: '/admin/ad/batchDelete', method: 'DELETE', data, }); }