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

export default {
  //获取会员账户列表
  GetMemberAccountPageList(data) {
    return request(getStoremanagement()+`/api/MemberInfoService/GetMemberAccountPageList`, {
      method: 'POST',
      data: data,
    });
  },

  //查询会员账户/卡号消费记录
  GetMemberAccountCardConsRecord(data) {
    return request(getStoremanagement()+'/api/StoredValueCard/GetMemberAccountAmountPage', {
      method: 'POST',
      data,
    });
  },

  //获取会员信息
  GetMemberPageQuery(data) {
    return request(getStoremanagement()+`​/api/StoredValueCard/GetMemberPageQuery`, {
      method: 'post',
      data: data,
    });
  },

  //添加会员
  CreateMemberInfo(data) {
    return request(getStoremanagement()+`/api/StoredValueCard/AddMember`, {
      method: 'post',
      data: data,
    });
  },

  //获取会员标签  和绑定详情
  GetMemberTagAndInfo(memberinfoid, platformtype) {
    return request(getStoremanagement()+`/api/StoredValueCard/GetMemberTagAndInfo?memberInfoId=${memberinfoid}&PlatformType=${platformtype}`,
      {
        method: 'get',
      },
    );
  },

  //获取会员
  GetPlatformMemberList(data) {
    return request(getStoremanagement()+`/api/StoredValueCard/GetPlatformMemberList?memberId=${data}`, {
      method: 'get',
    });
  },
};
