Skip to content

Commit c4bba32

Browse files
author
liyang1
committed
chore: 新增接入平台
1 parent df5d85e commit c4bba32

File tree

14 files changed

+514
-223
lines changed

14 files changed

+514
-223
lines changed

src/api/menus.ts

+161-178
Original file line numberDiff line numberDiff line change
@@ -1,190 +1,173 @@
11
// import request from '@/utils/request'
2-
const menus = [
3-
{
4-
id: '1',
5-
label: '人群智库',
6-
path: '',
7-
name: '',
8-
meta: { title: '人群智库' },
9-
children: [
10-
{
11-
id: '1-1',
12-
label: '用户群体',
13-
path: '/user-tower',
14-
name: 'user-tower',
15-
meta: { title: '用户群体' },
16-
},
17-
{
18-
id: '1-2',
19-
label: '人群洞察',
20-
path: '/crowd-insight',
21-
name: 'crowd-insight',
22-
meta: { title: '人群洞察' },
23-
},
24-
],
25-
},
26-
{
27-
id: '2',
28-
label: '标签管理',
29-
path: '',
30-
name: '',
31-
meta: { title: '标签管理' },
32-
children: [
33-
{
34-
id: '2-1',
35-
label: '用户标签',
36-
path: '/user-label',
37-
name: 'user-label',
38-
meta: { title: '用户标签' },
39-
},
40-
],
41-
},
42-
// {
43-
// id: '3',
44-
// label: 'PC数据看板',
45-
// path: '',
46-
// name: '',
47-
// meta: { title: 'PC数据看板' },
48-
// children: [
49-
// {
50-
// id: '3-1',
51-
// label: '区域日报',
52-
// path: '/regional-daily',
53-
// name: 'regional-daily',
54-
// meta: { title: '区域日报' },
55-
// },
56-
// ],
57-
// },
58-
// {
59-
// id: '4',
60-
// label: '用户',
61-
// path: '',
62-
// name: '',
63-
// meta: { title: '用户' },
64-
// children: [
65-
// {
66-
// id: '4-1',
67-
// label: '用户管理',
68-
// path: '/user-manages',
69-
// name: 'user-manages',
70-
// meta: { title: '用户管理' },
71-
// },
72-
// {
73-
// id: '4-2',
74-
// label: '分组管理',
75-
// path: '/user-groups',
76-
// name: 'user-groups',
77-
// meta: { title: '分组管理' },
78-
// },
79-
// ],
80-
// },
81-
{
82-
id: '5',
83-
label: '报表中心',
84-
path: '/report-center',
85-
name: 'report-center',
86-
meta: { title: '报表中心', link: '/home/index' },
87-
children: [
88-
// {
89-
// id: '5-1-1',
90-
// label: '首页',
91-
// path: '/index',
92-
// name: 'index',
93-
// meta: { title: '订单明细', link: '/home/index' },
94-
// },
95-
// {
96-
// id: '5-1',
97-
// label: '订单明细',
98-
// path: '/order-detail',
99-
// name: 'order-detail',
100-
// meta: { title: '订单明细', link: '/home/order-detail' },
101-
// },
102-
// {
103-
// id: '5-2',
104-
// label: '收银明细',
105-
// path: '/cashier-detail',
106-
// name: 'cashier-detail',
107-
// meta: { title: '收银明细', link: '/home/cashier-detail' },
108-
// },
109-
// {
110-
// id: '5-3',
111-
// label: '营业汇总分析',
112-
// path: '/business-summary',
113-
// name: 'business-summary',
114-
// meta: { title: '营业汇总分析', link: '/home/business-summary' },
115-
// },
116-
// {
117-
// id: '5-4',
118-
// label: '菜品销售总汇',
119-
// path: '/dishes-summary',
120-
// name: 'dishes-summary',
121-
// meta: { title: '菜品销售总汇', link: '/home/dishes-summary' },
122-
// },
123-
// {
124-
// id: '5-5',
125-
// label: '储值卡明细',
126-
// path: '/debit-card-detail',
127-
// name: 'debit-card-detail',
128-
// meta: { title: '储值卡明细', link: '/home/debit-card-detail' },
129-
// },
130-
// {
131-
// id: '5-6',
132-
// label: '储值卡汇总',
133-
// path: '/debit-card-summary',
134-
// name: 'debit-card-summary',
135-
// meta: { title: '储值卡汇总', link: '/home/debit-card-summary' },
136-
// },
137-
// {
138-
// id: '5-7',
139-
// label: '门店订货明细',
140-
// path: '/store-ordering-detail',
141-
// name: 'store-ordering-detail',
142-
// meta: { title: '门店订货明细', link: '/home/store-ordering-detail' },
143-
// },
144-
// {
145-
// id: '5-8',
146-
// label: '门店订货汇总',
147-
// path: '/store-summary',
148-
// name: 'store-summary',
149-
// meta: { title: '门店订货汇总', link: '/home/store-summary' },
150-
// },
151-
],
152-
},
153-
{
154-
id: '6',
155-
label: 'ABTest',
156-
path: '',
157-
name: '',
158-
meta: { title: 'ABTest' },
159-
children: [
160-
{
161-
id: '6-1',
162-
label: '应用管理',
163-
path: '/app-manage',
164-
name: '/app-manage',
165-
meta: { title: '应用管理' },
166-
},
167-
{
168-
id: '6-2',
169-
label: '实验管理',
170-
path: '/experiment-manage-list',
171-
name: 'experiment-manage-list',
172-
meta: { title: '实验管理' },
173-
},
174-
],
175-
},
176-
]
177-
export const getUserMenus = () => {
2+
const menusMap = {
3+
'1': [
4+
{
5+
id: '1',
6+
label: '人群智库',
7+
path: '',
8+
name: '',
9+
meta: { title: '人群智库' },
10+
children: [
11+
{
12+
id: '1-1',
13+
label: '用户群体',
14+
path: '/user-tower',
15+
name: 'user-tower',
16+
meta: { title: '用户群体' },
17+
},
18+
{
19+
id: '1-2',
20+
label: '人群洞察',
21+
path: '/crowd-insight',
22+
name: 'crowd-insight',
23+
meta: { title: '人群洞察' },
24+
},
25+
],
26+
},
27+
{
28+
id: '2',
29+
label: '标签管理',
30+
path: '',
31+
name: '',
32+
meta: { title: '标签管理' },
33+
children: [
34+
{
35+
id: '2-1',
36+
label: '用户标签',
37+
path: '/user-label',
38+
name: 'user-label',
39+
meta: { title: '用户标签' },
40+
},
41+
],
42+
},
43+
],
44+
'2': [
45+
{
46+
id: '1',
47+
label: '人群智库',
48+
path: '',
49+
name: '',
50+
meta: { title: '人群智库' },
51+
children: [
52+
{
53+
id: '1-1',
54+
label: '用户群体',
55+
path: '/commercial/cdp/user-tower',
56+
name: 'commercial-cdp-user-tower',
57+
meta: { title: '用户群体' },
58+
},
59+
{
60+
id: '1-2',
61+
label: '人群洞察',
62+
path: '/commercial/cdp/crowd-insight',
63+
name: 'commercial-cdp-crowd-insight',
64+
meta: { title: '人群洞察' },
65+
},
66+
],
67+
},
68+
{
69+
id: '2',
70+
label: '标签管理',
71+
path: '',
72+
name: '',
73+
meta: { title: '标签管理' },
74+
children: [
75+
{
76+
id: '2-1',
77+
label: '用户标签',
78+
path: '/commercial/cdp/user-label',
79+
name: 'commercial-cdp-user-label',
80+
meta: { title: '用户标签' },
81+
},
82+
],
83+
},
84+
// {
85+
// id: '4',
86+
// label: '用户',
87+
// path: '',
88+
// name: '',
89+
// meta: { title: '用户' },
90+
// children: [
91+
// {
92+
// id: '4-1',
93+
// label: '用户管理',
94+
// path: '/user-manages',
95+
// name: 'user-manages',
96+
// meta: { title: '用户管理' },
97+
// },
98+
// {
99+
// id: '4-2',
100+
// label: '分组管理',
101+
// path: '/user-groups',
102+
// name: 'user-groups',
103+
// meta: { title: '分组管理' },
104+
// },
105+
// ],
106+
// },
107+
{
108+
id: '5',
109+
label: '报表中心',
110+
path: '/report-center',
111+
name: 'report-center',
112+
meta: { title: '报表中心', link: '/home/index' },
113+
},
114+
{
115+
id: '6',
116+
label: 'ABTest',
117+
path: '',
118+
name: '',
119+
meta: { title: 'ABTest' },
120+
children: [
121+
{
122+
id: '6-1',
123+
label: '应用管理',
124+
path: '/app-manage',
125+
name: '/app-manage',
126+
meta: { title: '应用管理' },
127+
},
128+
{
129+
id: '6-2',
130+
label: '实验管理',
131+
path: '/experiment-manage-list',
132+
name: 'experiment-manage-list',
133+
meta: { title: '实验管理' },
134+
},
135+
],
136+
},
137+
],
138+
'3': [
139+
{
140+
id: '1',
141+
label: 'PC数据看板',
142+
path: '',
143+
name: '',
144+
meta: { title: 'PC数据看板' },
145+
children: [
146+
{
147+
id: '1-1',
148+
label: '区域日报',
149+
path: '/data-portal/regional-daily',
150+
name: 'data-portal-regional-daily',
151+
meta: { title: '区域日报' },
152+
},
153+
],
154+
},
155+
],
156+
}
157+
export const getUserMenus = (data: '1' | '2' | '3') => {
178158
// return request({
179159
// url: '/menus',
180160
// method: 'post',
181161
// })
182-
return new Promise((resolve) => {
162+
console.log('xxxx', data)
163+
return new Promise<any>((resolve) => {
183164
resolve({
184165
code: 200,
185-
data: menus,
166+
data: menusMap[data],
186167
msg: '请求成功',
187168
traceId: Date.now().toString(),
188169
})
189170
})
190171
}
172+
173+
export type PlatformType = '1' | '2' | '3'

0 commit comments

Comments
 (0)