import { request } from 'umi';
import { getDataBaseUrl,getStoremanagement } from '@/global_data';

export default {
  //获取会员储值卡列表
  GetMemberCardPageList(data) {
    return request(getStoremanagement()+`/api/StoredValueCard/GetMmenberCardPage`, {
      method: 'POST',
      data: data,
    });
  },

  //添加会员储值卡
  AddMemberCard(data) {
    return request(getStoremanagement()+`/api/StoredValueCard/AddMmenberCard`, {
      method: 'POST',
      data: data,
    });
  },

  //修改会员卡状态
  UpdateMemberCardState(data) {
    return request(getStoremanagement()+`/api/StoredValueCard/UpdateMmenberCardState`, {
      method: 'PUT',
      data: data,
    });
  },

  //获取会员分页
  GetMemberListByPage(data) {
    return request(getStoremanagement()+'/api/MemberInfoService/GetMemberPageQuery', {
      method: 'POST',
      data,
    });
  },

  //绑定会员
  OnBindMember(data) {
    return request(getStoremanagement()+'/api/StoredValueCard/MemberBindingCards', {
      method: 'POST',
      data,
    });
  },
};
