import request from '@/utils/request'

// 分页列表（一页10条）
export function listStoreProductTag(query) {
  return request({
    url: '/store/store/storeProductTag/list',
    method: 'get',
    params: query
  })
}

// 关联商品列表（分页）
export function listTagProducts(tagId, query) {
  return request({
    url: '/store/store/storeProductTag/products/' + tagId,
    method: 'get',
    params: query
  })
}

export function getStoreProductTag(id) {
  return request({
    url: '/store/store/storeProductTag/' + id,
    method: 'get'
  })
}

export function addStoreProductTag(data) {
  return request({
    url: '/store/store/storeProductTag',
    method: 'post',
    data
  })
}

export function updateStoreProductTag(data) {
  return request({
    url: '/store/store/storeProductTag',
    method: 'put',
    data
  })
}

export function delStoreProductTag(ids) {
  return request({
    url: '/store/store/storeProductTag/' + ids,
    method: 'delete'
  })
}
