import request from '@/config/axios'

export const getProductInfo = async (params) => {
  return await request.get({ url: `/cashier/get/product`, params })
}

export const addCart = async (data) => {
  return await request.post({ url: `/cashier/addCart`, data })
}

export const updateCartNum = async (data) => {
  return await request.post({ url: `/cashier/updateCartNum`, data })
}

export const getCarts = async (params) => {
  return await request.get({ url: `/cashier/getCarts`, params })
}

export const delCart = async (params) => {
  return await request.get({ url: `/cashier/delCart`, params })
}

export const hangUp = async (params) => {
  return await request.get({ url: `/cashier/hangUp`, params })
}

export const getHangList = async (params) => {
  return await request.get({ url: `/cashier/hangList`, params })
}

export const hangOff = async (params) => {
  return await request.get({ url: `/cashier/hangOff`, params })
}

export const hangDel = async (params) => {
  return await request.get({ url: `/cashier/hangDel`, params })
}

export const createOrder = async (data) => {
  return await request.post({ url: `/cashier/createOrder`, data })
}

export const pay = async (data) => {
  return await request.post({ url: `/cashier/pay`, data })
}

export const printOrder = async (params) => {
  return await request.get({ url: `/cashier/printOrder`, params })
}





