import { http } from '@/utils/http'
import type { Coupon2Type } from '@/types/coupon2'
import type { ListType, ListResponseType } from '@/types/list'
import { parseQueryValues } from '@/utils'

/** 获取商品可用优惠券列表 */
export const getCoupon2ViewmListApi = (params: Partial<Coupon2Type>, page: Partial<ListType>) => {
  return http.get<ListResponseType<Coupon2Type>>('/api/query/list?pagevalue=100', {
    ...page,
    ...parseQueryValues(params),
  })
}
