47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
// 商城动态 VO
|
|
export interface CircleVO {
|
|
id: number // 编号
|
|
userId: number // 用户编号
|
|
content: string // 发表内容
|
|
picUrl: string // 图片地址
|
|
likeCount: number // 点赞量
|
|
lookCount: number // 访问量
|
|
commentCount: number // 评论数量
|
|
version: number // 更新版本号
|
|
}
|
|
|
|
// 商城动态 API
|
|
export const CircleApi = {
|
|
// 查询商城动态分页
|
|
getCirclePage: async (params: any) => {
|
|
return await request.get({url: `/promotion/circle/page`, params})
|
|
},
|
|
|
|
// 查询商城动态详情
|
|
getCircle: async (id: number) => {
|
|
return await request.get({url: `/promotion/circle/get?id=` + id})
|
|
},
|
|
|
|
// 新增商城动态
|
|
createCircle: async (data: CircleVO) => {
|
|
return await request.post({url: `/promotion/circle/create`, data})
|
|
},
|
|
|
|
// 修改商城动态
|
|
updateCircle: async (data: CircleVO) => {
|
|
return await request.put({url: `/promotion/circle/update`, data})
|
|
},
|
|
|
|
// 删除商城动态
|
|
deleteCircle: async (id: number) => {
|
|
return await request.delete({url: `/promotion/circle/delete?id=` + id})
|
|
},
|
|
|
|
// 导出商城动态 Excel
|
|
exportCircle: async (params) => {
|
|
return await request.download({url: `/promotion/circle/export-excel`, params})
|
|
}
|
|
}
|