import request from '@/utils/request'

// 查询福禄商品列表
export async function listInfo(query) {
  let res = await request({
    url: '/activities/wx/order/list',
    method: 'get',
    params: {
      goodsType: '3',
      ...query
    }
  })
  res.rows = res.rows.map(val => {
    val.orderDataJson = JSON.parse(val.orderDataJson)
    return val
  })
  return res
}

// 查询福禄商品详细
export function activities(outTradeNo) {
  return request({
    url: '/activities/wx',
    method: 'PUT',
    params: {
      outTradeNo,
    }
  })
}

// 导出福禄商品
export function exportInfo(query) {
  return request({
    url: '/pc/fulu/export',
    method: 'get',
    params: query
  })
}
