2025-08-15 13:44:27 +08:00
|
|
|
import request from "@/utils/index";
|
2025-08-10 16:44:02 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取文章详情
|
|
|
|
|
* @param data
|
|
|
|
|
* @id * 文章id number
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
export const fetchArticleDetail = (data: any) => {
|
2026-01-05 20:45:20 +08:00
|
|
|
return request.get(`/news/detail/${data.id}?phone=${data?.phone || null}`);
|
2025-08-10 16:44:02 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 文章点赞
|
|
|
|
|
* @param data
|
|
|
|
|
* @id * 文章id number
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
export const fetchArticleLike = (data: any) => {
|
|
|
|
|
return request.post("/user/like", data);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 文章收藏
|
|
|
|
|
* @param data
|
|
|
|
|
* @id * 文章id number
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
export const fetchArticleFavorate = (data: any) => {
|
|
|
|
|
return request.post("/user/favorite", data);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 热门行业
|
|
|
|
|
export const getListByTagIndustry = (data: any) => {
|
2026-01-05 20:45:20 +08:00
|
|
|
console.log("🚀 ~ getListByTagIndustry ~ data:", data);
|
2025-08-15 13:44:27 +08:00
|
|
|
return request.get("/news/list/industry", { name: data.name });
|
2025-08-10 16:44:02 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 概念标签
|
|
|
|
|
export const getListByTag = (data: any) => {
|
2025-08-15 13:44:27 +08:00
|
|
|
return request.get("/news/list/tag", { name: data.name });
|
2026-01-05 20:45:20 +08:00
|
|
|
};
|