hongshu-web v1.0

This commit is contained in:
mayongjian
2024-07-03 16:56:33 +08:00
parent 4fbf472ba0
commit 05f8f39dde
93 changed files with 29139 additions and 71 deletions

79
src/api/search.ts Normal file
View File

@@ -0,0 +1,79 @@
import request from "@/utils/request";
import { NoteDTO } from "@/type/note"
/**
*
* @param currentPage
* @param pageSize
* @returns
*/
export const getRecommendNote = (currentPage: number, pageSize: number) => {
return request<any>({
url: `/web/es/note/getRecommendNote/${currentPage}/${pageSize}`, // mock接口
method: "get",
});
};
/**
*
* @param currentPage
* @param pageSize
* @param data
* @returns
*/
export const getNoteByDTO = (currentPage: number, pageSize: number, data: NoteDTO) => {
return request<any>({
url: `/web/es/note/getNoteByDTO/${currentPage}/${pageSize}`, // mock接口
method: "post",
data: data
});
};
export const getCategoryAgg = (data: NoteDTO) => {
return request<any>({
url: `/web/es/note/getCategoryAgg`, // mock接口
method: "post",
data: data
});
};
/**
*
* @param keyword
* @returns
*/
export const getRecordByKeyWord = (keyword: string) => {
return request<any>({
url: `/web/es/record/getRecordByKeyWord`, // mock接口
method: "get",
params: {
keyword
}
});
};
/**
*
* @returns
*/
export const getHotRecord = () => {
return request<any>({
url: `web/es/record/getHotRecord`, // mock接口
method: "get",
});
};
/**
*
* @param keyword
* @returns
*/
export const addRecord = (keyword: string) => {
return request<any>({
url: `/web/es/record/addRecord`, // mock接口
method: "get",
params: {
keyword
}
});
};