/*
 * @Description: 对应cku-user-service服务
 * @Author: zhoupeng
 * @Date: 2020-04-22 16:53:28
 * @LastEditTime: 2020-06-03 17:56:14
 */

/**
 * @description: 首页
 * @param {type}
 * @return:
 * @author: ykk
 */

import request from '../../../utils/request';
import Config from '../../../utils/config';
/**
 * @description: 首页
 * @param {type}
 * @return:
 * @author: ykk
 */
export const getTransferList = data => {
  return request(
    {
      url: Config.apis.cku.indexHome.getTransferList,
      method: 'GET',
      data,
    },
    'nothing',
  );
};
export const getNewdogchipList = data => {
  return request(
    {
      url: Config.apis.cku.indexHome.getNewdogchipList,
      method: 'GET',
      data,
    },
    'nothing',
  );
};
export const birthcertificateDetail = data => {
  return request(
    {
      url: Config.apis.cku.subscription.birthcertificateDetail,
      method: 'GET',
      data,
    },
    'nothing',
  );
};

export const transfer = data => {
  return request(
    {
      url: Config.apis.cku.subscription.transfer,
      method: 'POST',
      data,
    },
    'nothing',
  );
};

//用户升级
export const upgrade = data => {
  return request(
    {
      url: Config.apis.cku.ckuUser.upgrade,
      method: 'POST',
      data,
    },
    'nothing',
  );
};

//用户续费
export const renewal = data => {
  return request(
    {
      url: Config.apis.cku.ckuUser.renewal,
      method: 'POST',
      data,
    },
    'nothing',
  );
};

//会员和犬舍有效期拉平
export const identical = data => {
  return request(
    {
      url: Config.apis.cku.ckuUser.identical,
      method: 'GET',
      data,
    },
    'nothing',
  );
};

/**
 * @description: 创建订单
 * @param {type}
 * @return:
 * @author: ykk
 */
export const createOrder = data => {
  return request(
    {
      url: Config.apis.cku.indexHome.createOrder,
      method: 'POST',
      data,
    },
    'nothing',
  );
};

export const newdogchipView = data => {
  return request(
    {
      url: Config.apis.cku.newdogchip.view,
      method: 'GET',
      data,
    },
    'nothing',
  );
};

export const birthcertificateInfo = data => {
  return request(
    {
      url: Config.apis.cku.birthcertificate.info,
      method: 'GET',
      data,
    },
    'nothing',
  );
};

export const checkBirthCode = data => {
  return request(
    {
      url: Config.apis.cku.newdogchip.checkBirthCode,
      method: 'GET',
      data,
    },
    'nothing',
  );
};
export const getByIdentificationFlag = data => {
  return request(
    {
      url: Config.apis.cku.birthcertificate.getByIdentificationFlag,
      method: 'GET',
      data,
    },
    'nothing',
  );
};
export const getByBirthCerRegCode = data => {
  return request(
    {
      url: Config.apis.cku.birthcertificate.getByBirthCerRegCode,
      method: 'GET',
      data,
    },
    'nothing',
  );
};
export const newdogchipSave = data => {
  return request(
    {
      url: Config.apis.cku.newdogchip.save,
      method: 'POST',
      data,
    },
    'nothing',
  );
};
export const org = data => {
  return request(
    {
      url: Config.apis.cku.birthcertificate.org,
      method: 'GET',
      data,
    },
    'nothing',
  );
};
export const getPrice = data => {
  return request(
    {
      url: Config.apis.cku.newdogchip.getPrice,
      method: 'GET',
      data,
    },
    'nothing',
  );
};
