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