import request from '@/utils/request'
import Qs from 'qs'

export function listSaicgroup(query) {
  return request({
    url: '/saicgroup/list',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
  }
  })
}
export function listCoupons(query) {
  return request({
    url: '/saicgroup/listCoupons',
    method: 'get',
    params: query,
    paramsSerializer: function(params) {
      return Qs.stringify(params, { arrayFormat: 'repeat' })
  }
  })
}

export function deleteSaicgroup(data) {
  return request({
    url: '/saicgroup/delete',
    method: 'post',
    data
  })
}

export function importStaff(data, config) {
    return request({
        url: '/saicgroup/import',
        method: 'post',
        config: config,
        data
    })
}

export function saicCoupon(data) {
  return request({
    url: '/saicgroup/coupons',
    method: 'get'
  })
}
export function getSaicgroupConfig() {
  return request({
    url: '/saicgroup/getConfig',
    method: 'get'
  })
}
export function createSaicgroupConfig(data) {
  return request({
    url: '/saicgroup/createConfig',
    method: 'post',
    data
  })
}
export function bind(query) {
  return request({
    url: '/saicgroup/bind',
    method: 'get',
    params: query
  })
}
