import { request } from '@/utils/request.js'

/**
 * 母包管理 API接口
 */
export default {
  /**
   * 数据列表
   * @returns
   */
  getPageList(params = {}) {
    return request({
      // url: '/v1/dataReport/GamePackage/index',
      url: '/v1/advert/GamePackage/index',
      method: 'get',
      params
    })
  },

  /**
   * 添加数据
   * @returns
   */
  save(params = {}) {
    return request({
      // url: "/v1/dataReport/GamePackage/save",
      url: '/v1/advert/GamePackage/save',
      method: 'post',
      data: params
    })
  },

  /**
   * 更新数据
   * @returns
   */
  update(id, data = {}) {
    return request({
      // url: "/v1/dataReport/GamePackage/update?id=" + id,
      url: '/v1/advert/GamePackage/update?id=' + id,
      method: 'put',
      data
    })
  },

  /**
   * 读取数据
   * @returns
   */
  read(id) {
    return request({
      // url: "/v1/dataReport/GamePackage/read?id=" + id,
      url: '/v1/advert/GamePackage/read?id=' + id,
      method: 'get'
    })
  },

  /**
   * 删除数据
   * @returns
   */
  destroy(data) {
    return request({
      // url: "/v1/dataReport/GamePackage/destroy",
      url: '/v1/advert/GamePackage/destroy',
      method: 'delete',
      data
    })
  }
}
