import request from '@/utils/request' var service_name = 'oil-mall' var group_name = 'mallAdvertise' var new_group_name = 'mallHomeRecommended' export default { getByPage(page) { // 分页查询 return request({ url: `/${service_name}/${group_name}/getByPage`, method: 'post', data: page }) }, save(data) { // 新增广告 return request({ url: `/${service_name}/${group_name}/save`, method: 'post', data: data }) }, update(data) { // 修改广告 return request({ url: `/${service_name}/${group_name}/update`, method: 'post', data: data }) }, delete(data) { // 删除广告 return request({ url: `/${service_name}/${group_name}/delete`, method: 'post', data: data }) }, get(id) { // 查询广告详情 return request({ url: `/${service_name}/${group_name}/get/${id}`, method: 'get' }) }, goOnlineAndGoOffline(page) { // 广告上下线 return request({ url: `/${service_name}/${group_name}/goOnlineAndGoOffline`, method: 'post', data: page }) }, getHomeByPage(page) { // 分页查询 return request({ url: `/${service_name}/${new_group_name}/getByPage`, method: 'post', data: page }) }, topOne(id) { // 置顶 return request({ url: `/${service_name}/${new_group_name}/topOne/${id}`, method: 'get' }) }, homeDelete(page) { // 删除首页推荐 return request({ url: `/${service_name}/${new_group_name}/delete`, method: 'post', data: page }) }, whetherToRecommend(page) { // 修改是否推荐 return request({ url: `/${service_name}/${new_group_name}/whetherToRecommend`, method: 'post', data: page }) } }