import { service } from "./request";
import { logAPIUrl } from '@/http/configAPI.js'
import { commonFetch } from '@/http/fetch'

// export function logApi(params) {
//     return service({
//         url: `${logAPIUrl}/statistics/uploadLogFromFrontend
//         `,
//         method: 'post',
//         data: params
//     })
// }

export function logApi(params = {}) {
    return commonFetch({
        url: `${logAPIUrl}/statistics/uploadLogFromFrontend`,
        baseInfo: {
            pageSource: params.params.pageSource || ''
        },
        params: params.params
    })
}

export function reportFrontLogApi(params = {}) {
    return commonFetch({
        url: `/log/reportFrontLog`,
        params: params
    })
}