Files
zkxw/web-admin/src/api/sample-sms-notification.ts
T
2026-05-25 15:14:06 +08:00

45 lines
1.1 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 '@/utils/http'
type PageList<T> = {
list: T[]
total: number
page: number
pageSize: number
totalPages: number
}
/** 查询列表(联查 sample_reception + sms_notification) */
export function fetchSampleSmsNotificationList(params?: {
page?: number
pageSize?: number
keyword?: string
acceptConclusion?: string
smsNotified?: string
receptionTimeStart?: string
receptionTimeEnd?: string
}) {
return request.get<PageList<Record<string, unknown>>>({
url: '/web/admin/sample-sms-notifications/list',
params
})
}
/** 切换通知状态 */
export function fetchToggleSmsNotified(
id: string,
data: { smsNotified: number; sampleReceptionId?: string }
) {
return request.put({
url: `/web/admin/sample-sms-notifications/${id}/toggle-status`,
data
})
}
/** 生成短信内容 */
export function fetchGenerateSms(id: string, sampleReceptionId?: string) {
return request.post<{ smsContent: string }>({
url: `/web/admin/sample-sms-notifications/${id}/generate-sms`,
params: sampleReceptionId ? { sampleReceptionId } : undefined
})
}