import request from '@/utils/request'
// 获取用户详细信息
export function getDepInfo() {
  return request({
    url: '/system/dept/getDepInfo',
    method: 'get'
  })
}
//查询图片
export function getGoodsPictures(query) {
  return request({
    url: '/system/AppWebManagerGoodsController/getGoodsPictures',
    method: 'get',
    params: query
  })
}
//上传图片
export function upLoadImages(data) {
  return request({
    url: '/goods/uploadImages',
    method: 'post',
    data: data,
  })
}

// 查询商品信息列表
export function getInitGoodsManager(query) {
  return request({
    url: '/system/AppWebManagerGoodsController/getInitGoodsManager',
    method: 'get',
    params: query
  })
}
//游戏所属区域
export function getGameArea(query) {
  return request({
    url: '/system/AppWebManagerGoodsController/getGameArea',
    method: 'get',
    params: query
  })
}

// 添加图片
export function addGoodsPictures(data) {
  return request({
    url: '/system/goods/addGoodsPictures',
    method: 'post',
    data: data
  })
}


// 查询商品信息列表
export function listGoods(query) {
  return request({
    url: '/system/goods/list',
    method: 'get',
    params: query
  })
}

// 查询商品信息详细
export function getGoods(id) {
  return request({
    url: '/system/goods/' + id,
    method: 'get'
  })
}
// 查看合作方商品状态
export function goodsNoticeList(goodsId) {
  return request({
    url: '/system/goodsNotice/goodsNoticeList/' + goodsId,
    method: 'post'
  })
}

// 新增商品信息
export function addGoods(data) {
  return request({
    url: '/system/goods',
    method: 'post',
    data: data
  })
}

// 修改商品信息
export function updateGoods(data) {
  return request({
    url: '/system/goods',
    method: 'put',
    data: data
  })
}
// 出售商品
export function sell(data) {
  return request({
    url: '/system/goods/sell',
    method: 'post',
    data: data
  })
}
// 删除代售信息
export function dswBatchOffShelves(id) {
  return request({
    url: '/system/goods/dswBatchOffShelves/' + id,
    method: 'post'
  })
}
// 删除商品信息
export function delGoods(id) {
  return request({
    url: '/system/goods/batchOffShelves/' + id,
    method: 'post'
  })
}
// 刷新商品信息
export function refGoods(data) {
  return request({
    url: '/system/goodsRefresh/refresh',
    method: 'post',
	data:data
  })
}
// 刷新记录
export function getTBusShopInfo(id) {
  return request({
    url: '/system/Bushop/getTBusShopInfo/'+id,
    method: 'get',
  })
}
// 刷新记录
export function getTBusShopInfo1() {
  return request({
    url: '/system/goodsPaymentEntr/getTBusShopInfo',
    method: 'get',
  })
}
// 出售商品信息
export function goodsPayment(query) {
  return request({
    url: '/system/goodsPayment/getGoodsInfo',
    method: 'post',
	params: query
  })
}
export function goodsPaymentadd(data) {
  return request({
    url: 'system/goodsPayment/add',
    method: 'post',
	data: data
  })
}

//根据店铺id 判断是否有没传图片的 号
export function getGoodsByShopId(shopId) {
  return request({
    url: '/system/goods/selectTBusGoodsShopIdList/' + shopId,
    method: 'post'
  })
}

//游戏属性
export function getGameAttrib(id) {
  return request({
    url: '/system/gameAttrib/getGameAttrib/' + id,
    method: 'post'
  })
}
//游戏属性筛选
export function getGameAttr(query) {
  return request({
    url: '/system/tBusGameAttribute/getGameAttr',
    method: 'get',
	params: query
  })
}
//游戏属性筛选平铺数据
export function getGameAttr1(query) {
  return request({
    url: '/system/tBusGameAttribute/getGameAttr',
    method: 'get',
	params: query
  })
}
//游戏属性保存
export function addAttr(data) {
  return request({
    url: '/system/goods/addAttr',
    method: 'post',
	data: data
  })
}
// 撤回下架商品
export function revoke(data) {
  return request({
    url: '/system/goods/revoke/online',
    method: 'post',
    data: data
  })
}
// 审核代售商品
export function dswAudits(data) {
  return request({
    url: '/system/goods/dswAudits',
    method: 'post',
    data: data
  })
}


