|
@@ -1,17 +1,13 @@
|
|
|
-import { createRequest } from '@/utils/api';
|
|
|
-
|
|
|
-const request = createRequest(window.AppGlobalConfig.managerServer);
|
|
|
+import http from "@/utils/http";
|
|
|
|
|
|
export default {
|
|
|
- getNews: (param) => request('/news/info/list', { ...param }, 'get', false),
|
|
|
- getNewsDetail: (id) => request('/news/info/detail', { id }, 'get', false),
|
|
|
// 问题采集
|
|
|
- collect: (data) => request('/api/collect/question', { ...data }, 'post', false),
|
|
|
+ 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: (id, feedback) =>
|
|
|
- request(`/api/collect/question/${id}/feedback`, { feedback }, 'get', false)
|
|
|
+ feedback: async (id, feedback) =>
|
|
|
+ await http.get(`/api/collect/question/${id}/feedback`, { feedback }, false)
|
|
|
};
|