// 代客下单
import request from "@/utils/request-php";
import { getDouyinToken, getToken } from "@/utils/auth";

// 抖音团购核销准备
export function $douyin_fulfilmentcertificateprepare(data) {
  return request({
    url: "douyin/fulfilmentcertificateprepare",
    method: "post",
    data: {
      ...data,
    },
  });
}
// 抖音团购核销
export function $douyin_certificateprepare(data) {
  return request({
    url: "douyin/certificateprepare",
    method: "post",
    data: {
      ...data,
    },
  });
}

// 抖音团购核销撤销
export function $douyin_fulfilmentcertificatecancel(data) {
  return request({
    url: "douyin/fulfilmentcertificatecancel",
    method: "post",
    data: {
      ...data,
    },
  });
}
// 抖音团购核销记录
export function $douyin_orderlist(data) {
  return request({
    url: "douyin/orderlist",
    method: "post",
    data: {
      ...data,
    },
  });
}

// 抖音门店列表
export function $douyin_storelist(data) {
  return request({
    url: "douyin/storelist",
    method: "post",
    data: {
      ...data,
    },
  });
}

// 抖音绑定门店
export function $douyin_bindstore(data) {
  return request({
    url: "douyin/bindstore",
    method: "post",
    data: {
      ...data,
    },
  });
}
// 抖音订单查询

export function $douyin_orderquery(data) {
  return request({
    url: "douyin/orderquery",
    method: "post",
    data: {
      ...data,
    },
  });
}
//会员签入
export function $douyin_checkIn(data) {
  return request({
    url: "douyin/checkIn",
    method: "post",
    data: {
      clientType: "ADMIN",
      token: getToken(),
      loginName: localStorage.getItem("userInfo").phone,
      ...data,
    },
  });
}

//美团

// 美团获取uisdk 绑定 链接

export function $meituan_getuisdkurl(data) {
  return request({
    url: "meituan/getuisdkurl",
    method: "post",
    data: {
      ...data,
    },
  });
}
// 美团获取uisdk 解绑 链接

export function $meituan_getuisdkuniurl(data) {
  return request({
    url: "meituan/getuisdkuniurl",
    method: "post",
    data: {
      ...data,
    },
  });
}
// 美团团购核销准备

export function $meituan_fulfilmentcertificateprepare(data) {
  return request({
    url: "meituan/fulfilmentcertificateprepare",
    method: "post",
    data: {
      ...data,
    },
  });
}
// 美团执行核销

export function $meituan_certificateprepare(data) {
  return request({
    url: "meituan/certificateprepare",
    method: "post",
    data: {
      ...data,
    },
  });
}
// 美团团购核销记录

export function $meituan_orderlist(data) {
  return request({
    url: "meituan/orderlist",
    method: "post",
    data: {
      ...data,
    },
  });
}

// 美团团购撤销

export function $meituan_fulfilmentcertificatecancel(data) {
  return request({
    url: "meituan/fulfilmentcertificatecancel",
    method: "post",
    data: {
      ...data,
    },
  });
}

// 美团查询绑定状态
export function $meituan_searchstorestatus(data) {
  return request({
    url: "meituan/searchstorestatus",
    method: "post",
    data: {
      ...data,
    },
  });
}

// 登出
export function $logout(data) {
  return request({
    url: "user/logout",
    method: "post",
    data: {
      ...data,
    },
  });
}
