// api/index.js
import request from '@/utils/request.js'

export function getUserInfo(data) {
  return request({
    url: '/user/detail',
    method: 'GET',
    data,
  })
}

export function login(data) {
  return request({
    url: '/user/mobileCodeLogin',
    method: 'POST',
    data,
  })
}
export function getCode(data) {
  return request({
    url: '/auth/sendSms',
    method: 'POST',
    data,
  })
}
export function getProduct(en) {
  return request({
    url: `/product/en/${en}`,
    method: 'GET',
  })
}
export function queryExample(params) {
  return request({
    url: `/query/example`,
    method: 'GET',
    params,
  })
}

export function queryMarriage(data) {
  return request({
    url: `/query/marriage`,
    method: 'POST',
    data,
  })
}
export function queryResultByOrder(orderID) {
  return request({
    url: `/query/orderId/${orderID}`,
    method: 'GET',
  })
}
export function queryList(params) {
  return request({
    url: `/query/list`,
    method: 'GET',
    params,
  })
}

export function wxh5login(data) {
  return request({
    url: `/user/wxh5Auth`,
    method: 'POST',
    data,
  })
}
