import request from '@/utils/request'

// 查询个人主页列表
export function listPersonalHomepageInfo(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.personalHomepageInfo',
      _mt: 'list',
      ...query
    }
  })
}

// 查询个人主页详细
export function getPersonalHomepageInfo(id) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.personalHomepageInfo',
      _mt: 'get',
      id: id
    }
  })
}

// 新增个人主页
export function addPersonalHomepageInfo(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.personalHomepageInfo',
      _mt: 'add',
      personalHomepageInfo: data
    }
  })
}

// 修改个人主页
export function updatePersonalHomepageInfo(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.personalHomepageInfo',
      _mt: 'update',
      personalHomepageInfo: data
    }
  })
}

// 删除个人主页
export function delPersonalHomepageInfo(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.personalHomepageInfo',
      _mt: 'delete',
      id: id
    }
  })
}

// 导出个人主页
export function exportPersonalHomepageInfo(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.personalHomepageInfo',
      _mt: 'export',
      ...query
    }
  })
}
