import request from "@/utils/request.js";


/**
 * @description 获取合作商列表
 * @param {*} (pageNum,pageSize)
 * @returns data
 */
export function businessListApi(pageNum, pageSize) {
  return request({
    url: `/serviceInfo/page?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'get'
  })
}

/**
 * @description 通过id获取合作商
 * @param {*} id
 * @returns data
 */
export function getBusinessByIdApi(id) {
  return request({
    url: `/serviceInfo/get?id=${id}`,
    method: 'get'
  })
}

/**
 * @description 新增合作商
 * @param {*} data
 * @returns data
 */
export function addBusinessApi(data) {
  return request({
    url: `/serviceInfo/save`,
    method: 'post',
    data
  })
}

/**
 * @description 修改合作商
 * @param {*} data
 * @returns data
 */
export function updateBusinessApi(data) {
  return request({
    url: `/serviceInfo/update`,
    method: 'post',
    data
  })
}