27 lines
698 B
TypeScript
27 lines
698 B
TypeScript
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
|
|
}
|
|
} |