65 lines
1.4 KiB
TypeScript
65 lines
1.4 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);
|
||
|
|
};
|
||
|
|
|