vue3/src/api/feedback/index.ts

50 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import request from '@/config/axios'
// 留言板 VO
export interface FeedbackVO {
id: number // 主键
content: string // 客户提交的反馈内容
backContent: string // 医生回复的内容
userId: number // 客户id
doctorName: string // 医生姓名
doctorId: number // 医生id
backTime: Date | number // 医生回复时间支持Date对象或时间戳
orgid: number // 机构ID
orgname: string // 机构名称
status: number // 回复状态
deviceid: number // 设备号
}
// 留言板 API
export const FeedbackApi = {
// 查询留言板分页
getFeedbackPage: async (params: any) => {
return await request.get({ url: `/system/feedback/page`, params })
},
// 查询留言板详情
getFeedback: async (id: number) => {
return await request.get({ url: `/system/feedback/get?id=` + id })
},
// 新增留言板
createFeedback: async (data: FeedbackVO) => {
return await request.post({ url: `/system/feedback/create`, data })
},
// 修改留言板
updateFeedback: async (data: FeedbackVO) => {
return await request.put({ url: `/system/feedback/update`, data })
},
// 删除留言板
deleteFeedback: async (id: number) => {
return await request.delete({ url: `/system/feedback/delete?id=` + id })
},
// 导出留言板 Excel
exportFeedback: async (params) => {
return await request.download({ url: `/system/feedback/export-excel`, params })
},
}