// 控制台相关接口
import request from '@/utils/request'

// 提交企业认证审核
export function enterpriseAudit (query) {
  return request({
    url: '/member/enterprise/create',
    method: 'post',
    data: query
  })
}

// 根据用户查询企业认证信息和用户信息
export function auditInfo(query) {
    return request({
        url: '/member/user/getUserAndEnterpriseInfo',
        method: 'get',
        data: query
    })
}


// 根据用户查询AppId和AppSecret
export function appInfo() {
    return request({
        url: '/apihub/app-credential/get',
        method: 'get',
    })
}

// 获取Token信息
export function getTokenInfo() {
    return request({
        url: '/app/ai-token/info',
        method: 'get',
    })
}

// 获取/创建Token
export function getToken() {
    return request({
        url: '/app/ai-token/get',
        method: 'post',
    })
}

// 创建充值记录
export function createRecharge(amount) {
    return request({
        url: '/app/recharge/create',
        method: 'post',
        data: { amount }
    })
}

// 查询充值记录状态
export function getRecharge(id) {
    return request({
        url: '/app/recharge/get',
        method: 'get',
        params: { id }
    })
}
