import http from "@/utils/http"; export default { // 问题采集 collect: async (data) => await http.post('/ai/question/collect', { ...data }, false), // 上报埋点必须要使用此方法来做同步请求,axios 异步请求无法发送 collectUserBehavior: (data) => { const blob = new Blob([JSON.stringify(data)], {type: 'application/json;charset=UTF-8'}) navigator.sendBeacon(`${window.AppGlobalConfig.managerServer}/api/collect/user/behavior/log`, blob); }, feedback: async (id, feedback) => await http.get(`/api/collect/question/${id}/feedback`, { feedback }, false) };