import { axios } from '@/util/axios/request'

const api = {
  baseUrl: '/group/wechat/index/config',
  bannerUrl: '/group/wechat/banner',
  logoUrl: '/group/wechat/logo',
}

export function getIndexConfig() {
  return axios({
    url: api.baseUrl,
    method: 'get',
    useFullLoading: true
  })
}

export function delbannerById(id) {
  return axios({
    url: api.bannerUrl + "/" + id,
    method: 'delete',
    useFullLoading: true
  })
}

export function delLogoById(id) {
  return axios({
    url: api.logoUrl + "/" + id,
    method: 'delete',
    useFullLoading: true
  })
}


export function saveBanner(data) {
  return axios({
    url: api.bannerUrl,
    data: data,
    method: 'post',
    useFullLoading: true
  })
}

export function saveLogo(data) {
  return axios({
    url: api.logoUrl,
    data: data,
    method: 'post',
    useFullLoading: true
  })
}
