index.ts 876 B

123456789101112131415161718192021222324252627282930
  1. import { http } from '@/utils/http'
  2. import type { OrderType } from '@/types/order'
  3. import type { ListType, ListResponseType } from '@/types/list'
  4. import { parseQueryValues } from '@/utils'
  5. /** 订单列表 */
  6. export const getOrderListApi = (params: Partial<OrderType>, page: Partial<ListType>) => {
  7. return http.get<ListResponseType<OrderType>>('/api/query/list?pagevalue=51', {
  8. ...page,
  9. ...parseQueryValues(params),
  10. })
  11. }
  12. /** 获取订单详情 */
  13. export const getOrderDetailApi = (id: string) => {
  14. return http.get<OrderType>(
  15. '/api/query/view?pagevalue=61',
  16. {
  17. ...parseQueryValues({ ordersid: id }),
  18. },
  19. {
  20. formatData: true,
  21. },
  22. )
  23. }
  24. /** 使用优惠劵提交订单 */
  25. export const submitOrderApi = (params: { ordersproductid: string; orderscouponid: string }) => {
  26. return http.get<any>('/api/nlua/call?pagevalue=44', params)
  27. }