import baseAxios from '../index'
import {toBase64} from "js-base64"

export function queryFaqList() {
  return baseAxios<{
    question: string[]
    count: number
  }>({
    url: '/faq/query/list',
    method: 'get',
  })
}
export function queryFaqAnswer(data: { question: string }) {
  const base64 = toBase64(data.question)
  return baseAxios<string>({
    url: '/faq/query/answer',
    method: 'get',
    params: {
      question: base64
    },
  })
}
