notice.ts 743 B

123456789101112131415161718192021222324252627
  1. import { usePost, stringify, useGet, type Response } from "@/.cool";
  2. import type { GetPage } from '../types/index'
  3. export type AppUpdateNoticePageResult = {
  4. noticeId: string
  5. createdTime: string
  6. readFlag: string
  7. noticeName: string
  8. }
  9. export type AppUpdateNoticeResult = {
  10. id: string
  11. updateTime: string
  12. createdUserName: string
  13. content: string
  14. }
  15. export type pageParams = {
  16. userId: string
  17. }
  18. export function getAppUpdateNoticePage(parameter: any) {
  19. return useGet(`/subject/notice-user/page`, parameter) as Promise<GetPage<AppUpdateNoticePageResult>>
  20. }
  21. export function fetchAppUpdateNotice(parameter: any) {
  22. return useGet(`/subject/notice/app/read/${parameter.id}`) as Promise<AppUpdateNoticeResult>
  23. }