import axiosApi from './AxiosApi.js'

const apiList = {
  getMemberList: `/member/adminPage`,
  addTag: `/member/addTag`,
  forbiddenMember: `/member/forbidden`,
  getMemberInfo: `/member/query/`,
  getMemberAddress: `/memberAddress/page`,
  getOrderList: `/order/findAdminOrderList`,
  getCustomData: `/order/getOrderStatisticsByMid/`, 
  getCommentList: `/comment/findCommentList`, 
  getMemberBillDetials: `/member/getMemberBillDetials`,
  editMemberBill: `/member/editMemberBill`

}
export default {
    // 平台会员余额修改
    editMemberBill(data) {
      return axiosApi({
        method: 'POST',
        url: apiList.editMemberBill,
        data
      })
    },
   // 平台会员余额明细
   getMemberBillDetials(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.getMemberBillDetials,
      data
    })
  },
  // 客户管理列表
  getMemberList(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.getMemberList,
      data
    })
  },
  // 打标签
  addTag(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.addTag,
      data
    })
  },
  // 加黑名单
  forbiddenMember(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.forbiddenMember,
      data
    })
  },
  // 客户详情
  getMemberInfo(id) {
    return axiosApi({
      method: 'GET',
      url: `${apiList.getMemberInfo}${id}`
    })
  },
  // 客户消费数据
  getCustomData(id) {
    return axiosApi({
      method: 'GET',
      url: `${apiList.getCustomData}${id}`
    })
  },
  // 会员订单
  getOrderList(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.getOrderList,
      data
    })
  },
  // 客户评价列表
  getCommentList(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.getCommentList,
      data
    })
  },
  // 会员收货地址
  getMemberAddress(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.getMemberAddress,
      data
    })
  }
}
