更新:增加新闻详情页面
This commit is contained in:
27
api/modules/news.ts
Normal file
27
api/modules/news.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { mainClient } from '@/api/clients/main'
|
||||
import type { IApiResponse } from '@/api/types'
|
||||
|
||||
export const newsApi = {
|
||||
/**
|
||||
* 获取新闻详情
|
||||
*/
|
||||
getNewsDetail: async (newsId: string | number) => {
|
||||
const res = await mainClient.request<IApiResponse<any>>({
|
||||
url: `common/message/getMessageById?id=${newsId}`,
|
||||
method: 'POST'
|
||||
})
|
||||
return res
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取太湖之光文章详情
|
||||
*/
|
||||
getTaihuWelfareArticleDetail: async (newsId: string | number) => {
|
||||
const res = await mainClient.request<IApiResponse<any>>({
|
||||
url: 'common/taihuWelfare/getTaihuWelfareArticleDetail',
|
||||
method: 'POST',
|
||||
data: { id: newsId }
|
||||
})
|
||||
return res
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user