83 lines
1.9 KiB
TypeScript
83 lines
1.9 KiB
TypeScript
import Request from "@/utils";
|
|
|
|
// 获取验证码
|
|
export const getCaptcha = (data: any) => {
|
|
return Request.post("/common/sms", data);
|
|
};
|
|
|
|
// 用户登录
|
|
export const login = (data: any) => {
|
|
return Request.post("/common/login", data);
|
|
};
|
|
|
|
// 微信分享签名
|
|
export const getWeChatSdkData = (data: any) => {
|
|
return Request.post("/wechat/share", data);
|
|
};
|
|
|
|
// 获取实时快讯
|
|
export const getNewsFast = (data: any) => {
|
|
return Request.post("/news/pageIndex", data);
|
|
};
|
|
|
|
// 检查是否有新的快讯
|
|
export const checkNews = (data: any) => {
|
|
return Request.post("/news/pageIndexCheck", data);
|
|
};
|
|
|
|
// 新闻/快讯,点赞功能
|
|
export const likeNews = (data: any) => {
|
|
return Request.post("/news/like", data);
|
|
};
|
|
|
|
// 获取栏目列表
|
|
export const getNewsColumn = (data: any) => {
|
|
return Request.post("/news/column", data);
|
|
};
|
|
|
|
// 获取标签列表
|
|
export const getNewsTag = (data: any) => {
|
|
return Request.post("/news/tag", data);
|
|
};
|
|
|
|
// 获取新闻列表
|
|
export const getNewsList = (data: any) => {
|
|
return Request.post("/news/newsList", data);
|
|
};
|
|
|
|
// 栏目解锁接口
|
|
export const unlockColumn = (data: any) => {
|
|
return Request.post("/user/unlock", data);
|
|
};
|
|
|
|
// 我订阅的栏目列表
|
|
export const getUnlockList = (data: any) => {
|
|
return Request.post("/user/unlockList", data);
|
|
};
|
|
|
|
// 全文搜索
|
|
export const searchNews = (data: any) => {
|
|
return Request.post("/news/search", data);
|
|
};
|
|
|
|
// 已发布列表
|
|
export const getReleaseList = (data: any) => {
|
|
return Request.post("/news/top_news_release_h5_d", data);
|
|
};
|
|
|
|
// 编辑精选接口
|
|
export const editTopNews = (data: any) => {
|
|
return Request.post("/news/list/published", data);
|
|
};
|
|
|
|
// 编辑精选接口
|
|
export const sendToken = (data: any) => {
|
|
return Request.post("/common/forward/financial", data);
|
|
};
|
|
|
|
// 退出登录
|
|
export const doLogout = (data: any) => {
|
|
console.log("🚀 ~ doLogout ~ data:", data);
|
|
return Request.post("/common/logout", data);
|
|
};
|