eight
2024-12-02 08d2852c99d71a7d76f1fa330f6b14838b68ee00
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
export interface Replay {
  title: string
  description: string
  picUrl: string
  url: string
}
 
export type MenuType =
  | ''
  | 'click'
  | 'view'
  | 'scancode_waitmsg'
  | 'scancode_push'
  | 'pic_sysphoto'
  | 'pic_photo_or_album'
  | 'pic_weixin'
  | 'location_select'
  | 'article_view_limited'
 
interface _RawMenu {
  // db
  id: number
  parentId: number
  accountId: number
  appId: string
  createTime: number
 
  // mp-native
  name: string
  menuKey: string
  type: MenuType
  url: string
  miniProgramAppId: string
  miniProgramPagePath: string
  articleId: string
  replyMessageType: string
  replyContent: string
  replyMediaId: string
  replyMediaUrl: string
  replyThumbMediaId: string
  replyThumbMediaUrl: string
  replyTitle: string
  replyDescription: string
  replyArticles: Replay
  replyMusicUrl: string
  replyHqMusicUrl: string
}
 
export type RawMenu = Partial<_RawMenu>
 
interface _Reply {
  type: string
  accountId: number
  content: string
  mediaId: string
  url: string
  thumbMediaId: string
  thumbMediaUrl: string
  title: string
  description: string
  articles: null | Replay[]
  musicUrl: string
  hqMusicUrl: string
}
 
export type Reply = Partial<_Reply>
 
interface _Menu extends RawMenu {
  children: _Menu[]
  reply: Reply
}
 
export type Menu = Partial<_Menu>