import requestCF from '@/utils/aRequestCF'
import qs from 'qs'

export function getUserInfoByUserId(params) {
  return requestCF({
    url: '/admin/auth/addressbook/clerk/getStallCodeByClerkId',
    method: 'get',
    params
  })
}
// 门店维护
export function editStore(data) {
  return requestCF({
    url: '/admin/auth/stall/settingOrUpdateStall',
    method: 'post',
    data: qs.stringify(data)
  })
}
// 获取门店详情
export function getStoreDetail(params) {
  return requestCF({
    url: '/admin/auth/stall/getByOyStallCode',
    method: 'get',
    params
  })
}
// 获取专柜列表 
export function getStoreList(params) {
  return requestCF({
    url: '/admin/auth/stall/getStallInfoListByUserId',
    method: 'get',
    params
  })
}
// 判断是否为主管
export function getDirector(params) {
  return requestCF({
    url: '/admin/auth/addressbook/clerk/isSupervisor',
    method: 'get',
    params
  })
}
// 获取一个部门下的所有员工列表  
export function getMemberListByCode(params) {
  return requestCF({
    url: '/admin/auth/stall/getUserInfoByOyStallCode',
    method: 'get',
    params
  })
}
// 添加优惠券 
export function addCoupon(data) {
  return requestCF({
    url: '/admin/auth/coupon/newCoupon',
    method: 'post',
    data: qs.stringify(data)
  })
} 
// 获取优惠券列表 
export function getCouponList(params) {
  return requestCF({
    url: '/admin/auth/coupon/getAllCouponsByOyStallCode',
    method: 'get',
    params
  })
} 
