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



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

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

//修改会员信息
export function UpdateMemberInfo(data) {
  return request(getStoremanagement()+`/api/MemberInfoService/UpdateMemberInfo`, {
    method: 'post',
    data: data,
  });
}

//修改会员状态
export function UpdateMemberStatus(data) {
  return request(getStoremanagement()+`/api/MemberInfoService/UpdateMemberStatus`, {
    method: 'post',
    data: data,
  });
}

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

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

//修改会员标签
export function UpdateMemberTag(data) {
  return request(getStoremanagement()+`/api/MemberInfoService/UpdateMemberTag`, {
    method: 'post',
    data: data,
  });
}

