import { requestClient } from '#/api/request';

export const tianyibiApi = {
  /**
   * 获取天医币订单列表
   */
  getPointOrdersList: (data: {
    endTime?: string;
    limit: number;
    page: number;
    startTime?: string;
    tel?: string;
  }) => {
    return requestClient.post('/common/orders/getPointOrdersListNoUse', data);
  },

  /**
   * 手动确认消耗
   */
  manualConsumeTianyibi: (data: { orderId: number }) => {
    return requestClient.post('/common/orders/manualConsumePoint', data);
  },

  /**
   * 取消消耗
   */
  cancelConsumeTianyibi: (data: { orderId: number }) => {
    return requestClient.post('/common/orders/cancelConsumePoint', data);
  },

  /**
   * 自动消耗
   */
  autoConsumeTianyibi: () => {
    return requestClient.post('/common/orders/autoConsumePoint');
  },
};
