| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- // import request from '@/utils/request'
- // 獲取路由 - 現在使用靜態配置,不再從後端獲取
- export const getRouters = () => {
- return Promise.resolve({
- data: [
- {
- path: '/user',
- component: 'Layout',
- redirect: '/user/myuser',
- meta: {
- icon:"peoples",
- link: null,
- noCache: false,
- title:"我的會員",
- },
- children: [
- {
- path: 'myuser',
- component: 'agent/myuser',
- name: 'myuser',
- meta: {title: '我的會員', icon: 'user', affix: true},
- children: []
- },
- {
- path: 'income',
- component: 'agent/income',
- name: 'income',
- meta: {title: '我的收益', icon: 'money', affix: false},
- children: []
- }
- ]
- },
- {
- path:"/authUp",
- component: "Layout",
- redirect: "noRedirect",
- alwaysShow: true,
- meta:{
- icon:"upload",
- link: null,
- noCache: false,
- title:"會員授權上傳",
- },
- children: [
- {
- path: 'authUp/userContact',
- component: 'agent/userContact',
- name: 'userContact',
- meta: {title: '會員聯絡人', icon: 'people', affix: false},
- children: []
- },
- {
- path: 'authUp/position',
- component: 'agent/position',
- name: 'position',
- meta: {title: '會員定位資訊', icon: 'monitor', affix: false},
- children: []
- },
- {
- path: 'authUp/image',
- component: 'agent/image',
- name: 'image',
- meta: {title: '會員圖片', icon: 'eye', affix: false},
- children: []
- },
- {
- path: 'authUp/call',
- component: 'agent/call',
- name: 'call',
- meta: {title: '通話記錄', icon: 'phone', affix: false},
- children: []
- },
- {
- path: 'authUp/sms',
- component: 'agent/sms',
- name: 'sms',
- meta: {title: '簡訊記錄', icon: 'message', affix: false},
- children: []
- },
- ]
- }
- ]
- })
- }
- /*
- 菜單配置說明:
-
- - path: 路由路徑
- - component: 組件路徑(對應 views 目錄下的 .vue 文件)
- - name: 路由名稱
- - redirect: 重定向路徑
- - meta: 元資訊
- - title: 菜單標題
- - icon: 圖標名稱(對應 src/icons/svg 目錄下的圖標)
- - roles: 權限角色(可選)
-
- 如何添加新菜單:
- 1. 在 views 目錄下創建對應的 .vue 文件
- 2. 在 children 數組中添加新的菜單項
- 3. component 路徑要匹配 views 目錄下的文件路徑
-
- 示例:添加一個新的 "個人中心" 菜單
- {
- path: 'profile',
- component: 'system/user/profile/index',
- name: 'Profile',
- meta: { title: '個人中心', icon: 'user' },
- children: []
- }
- */
|