import request from '@/utils/request'

// 查询电商账户表列表
export function listAccount(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopAccount',
      _mt: 'list',
      ...query
    }
  })
}

// 查询电商账户表详细
export function getAccount(id) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopAccount',
      _mt: 'get',
      id: id
    }
  })
}

// 新增电商账户表
export function addAccount(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.shop.shopAccount',
      _mt: 'add',
      shopAccount: data
    }
  })
}

// 修改电商账户表
export function updateAccount(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.shop.shopAccount',
      _mt: 'update',
      shopAccount: data
    }
  })
}

// 删除电商账户表
export function delAccount(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.shop.shopAccount',
      _mt: 'delete',
      id: id
    }
  })
}

// 导出电商账户表
export function exportAccount(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopAccount',
      _mt: 'export',
      ...query
    }
  })
}

export function userList() {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopAccount',
      _mt: 'options'
    }
  })
}
