潘志宝
6 天以前 f6ea543b3de9a770c1bf5db2baf3e8a5dc2c867a
提交 | 用户 | 时间
820397 1 // APP 链接分组
H 2 export interface AppLinkGroup {
3   // 分组名称
4   name: string
5   // 链接列表
6   links: AppLink[]
7 }
9259c2 8
820397 9 // APP 链接
H 10 export interface AppLink {
11   // 链接名称
12   name: string
13   // 链接地址
14   path: string
15   // 链接的类型
16   type?: APP_LINK_TYPE_ENUM
17 }
18
19 // APP 链接类型(需要特殊处理,例如商品详情)
20 export const enum APP_LINK_TYPE_ENUM {
21   // 拼团活动
22   ACTIVITY_COMBINATION,
23   // 秒杀活动
24   ACTIVITY_SECKILL,
9259c2 25   // 积分商城活动
H 26   ACTIVITY_POINT,
820397 27   // 文章详情
H 28   ARTICLE_DETAIL,
29   // 优惠券详情
30   COUPON_DETAIL,
31   // 自定义页面详情
32   DIY_PAGE_DETAIL,
33   // 品类列表
34   PRODUCT_CATEGORY_LIST,
35   // 商品列表
36   PRODUCT_LIST,
37   // 商品详情
38   PRODUCT_DETAIL_NORMAL,
39   // 拼团商品详情
40   PRODUCT_DETAIL_COMBINATION,
41   // 秒杀商品详情
42   PRODUCT_DETAIL_SECKILL
43 }
44
45 // APP 链接列表(做一下持久化?)
46 export const APP_LINK_GROUP_LIST = [
47   {
48     name: '商城',
49     links: [
50       {
51         name: '首页',
52         path: '/pages/index/index'
53       },
54       {
55         name: '商品分类',
56         path: '/pages/index/category',
57         type: APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST
58       },
59       {
60         name: '购物车',
61         path: '/pages/index/cart'
62       },
63       {
64         name: '个人中心',
65         path: '/pages/index/user'
66       },
67       {
68         name: '商品搜索',
69         path: '/pages/index/search'
70       },
71       {
72         name: '自定义页面',
73         path: '/pages/index/page',
74         type: APP_LINK_TYPE_ENUM.DIY_PAGE_DETAIL
75       },
76       {
77         name: '客服',
78         path: '/pages/chat/index'
79       },
80       {
81         name: '系统设置',
82         path: '/pages/public/setting'
83       },
84       {
85         name: '常见问题',
86         path: '/pages/public/faq'
87       }
88     ]
89   },
90   {
91     name: '商品',
92     links: [
93       {
94         name: '商品列表',
95         path: '/pages/goods/list',
96         type: APP_LINK_TYPE_ENUM.PRODUCT_LIST
97       },
98       {
99         name: '商品详情',
100         path: '/pages/goods/index',
101         type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_NORMAL
102       },
103       {
104         name: '拼团商品详情',
105         path: '/pages/goods/groupon',
106         type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_COMBINATION
107       },
108       {
109         name: '秒杀商品详情',
110         path: '/pages/goods/seckill',
111         type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL
112       }
113     ]
114   },
115   {
116     name: '营销活动',
117     links: [
118       {
119         name: '拼团订单',
120         path: '/pages/activity/groupon/order'
121       },
122       {
123         name: '营销商品',
124         path: '/pages/activity/index'
125       },
126       {
127         name: '拼团活动',
128         path: '/pages/activity/groupon/list',
129         type: APP_LINK_TYPE_ENUM.ACTIVITY_COMBINATION
130       },
131       {
132         name: '秒杀活动',
133         path: '/pages/activity/seckill/list',
134         type: APP_LINK_TYPE_ENUM.ACTIVITY_SECKILL
135       },
136       {
9259c2 137         name: '积分商城活动',
H 138         path: '/pages/activity/point/list',
139         type: APP_LINK_TYPE_ENUM.ACTIVITY_POINT
140       },
141       {
820397 142         name: '签到中心',
H 143         path: '/pages/app/sign'
144       },
145       {
146         name: '优惠券中心',
147         path: '/pages/coupon/list'
148       },
149       {
150         name: '优惠券详情',
151         path: '/pages/coupon/detail',
152         type: APP_LINK_TYPE_ENUM.COUPON_DETAIL
153       },
154       {
155         name: '文章详情',
156         path: '/pages/public/richtext',
157         type: APP_LINK_TYPE_ENUM.ARTICLE_DETAIL
158       }
159     ]
160   },
161   {
162     name: '分销商城',
163     links: [
164       {
165         name: '分销中心',
166         path: '/pages/commission/index'
167       },
168       {
169         name: '推广商品',
170         path: '/pages/commission/goods'
171       },
172       {
173         name: '分销订单',
174         path: '/pages/commission/order'
175       },
176       {
177         name: '我的团队',
178         path: '/pages/commission/team'
179       }
180     ]
181   },
182   {
183     name: '支付',
184     links: [
185       {
186         name: '充值余额',
187         path: '/pages/pay/recharge'
188       },
189       {
190         name: '充值记录',
191         path: '/pages/pay/recharge-log'
192       }
193     ]
194   },
195   {
196     name: '用户中心',
197     links: [
198       {
199         name: '用户信息',
200         path: '/pages/user/info'
201       },
202       {
203         name: '用户订单',
204         path: '/pages/order/list'
205       },
206       {
207         name: '售后订单',
208         path: '/pages/order/aftersale/list'
209       },
210       {
211         name: '商品收藏',
212         path: '/pages/user/goods-collect'
213       },
214       {
215         name: '浏览记录',
216         path: '/pages/user/goods-log'
217       },
218       {
219         name: '地址管理',
220         path: '/pages/user/address/list'
221       },
222       {
223         name: '用户佣金',
224         path: '/pages/user/wallet/commission'
225       },
226       {
227         name: '用户余额',
228         path: '/pages/user/wallet/money'
229       },
230       {
231         name: '用户积分',
232         path: '/pages/user/wallet/score'
233       }
234     ]
235   }
236 ] as AppLinkGroup[]