天波用户运营管理后台系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

334 lines
8.6KB

  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. Vue.use(Router)
  4. /* Layout */
  5. import Layout from '@/layout'
  6. /**
  7. * Note: sub-menu only appear when route children.length >= 1
  8. * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
  9. *
  10. * hidden: true if set true, item will not show in the sidebar(default is false)
  11. * alwaysShow: true if set true, will always show the root menu
  12. * if not set alwaysShow, when item has more than one children route,
  13. * it will becomes nested mode, otherwise not show the root menu
  14. * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
  15. * name:'router-name' the name is used by <keep-alive> (must set!!!)
  16. * meta : {
  17. roles: ['admin','editor'] control the page roles (you can set multiple roles)
  18. title: 'title' the name show in sidebar and breadcrumb (recommend set)
  19. icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
  20. breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
  21. activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
  22. }
  23. */
  24. /**
  25. * constantRoutes
  26. * a base page that does not have permission requirements
  27. * all roles can be accessed
  28. */
  29. export const constantRoutes = [{
  30. path: '/redirect',
  31. component: Layout,
  32. hidden: true,
  33. children: [{
  34. path: '/redirect/:path(.*)',
  35. component: () => import('@/views/redirect/index')
  36. }]
  37. },
  38. {
  39. path: '/login',
  40. component: () => import('@/views/login/index'),
  41. hidden: true
  42. },
  43. {
  44. path: '/404',
  45. component: () => import('@/views/404'),
  46. hidden: true
  47. },
  48. {
  49. path: '/',
  50. component: Layout,
  51. redirect: '/dashboard',
  52. children: [{
  53. path: 'dashboard',
  54. name: '首页',
  55. component: () => import('@/views/dashboard/index'),
  56. meta: {
  57. title: '首页',
  58. icon: 'el-icon-s-home',
  59. affix: true
  60. }
  61. }]
  62. },
  63. // 收单系统 todo
  64. {
  65. path: '/collection-order-system',
  66. component: Layout,
  67. redirect: '/collection-order-list',
  68. name: 'collection-order-system',
  69. hidden: true,
  70. meta: {
  71. title: '收单系统',
  72. icon: 'el-icon-s-help'
  73. },
  74. children: [
  75. {
  76. path: '/collection-order-list',
  77. name: 'collection-order-list',
  78. component: () => import('@/views/collection-order-system/main/collection-order-list/index'),
  79. meta: {
  80. title: '收单系统', //收单列表
  81. icon: 'el-icon-s-order'
  82. }
  83. },
  84. ]
  85. },
  86. // 流量统计 todo
  87. {
  88. path: '/traffic-statistics',
  89. component: Layout,
  90. redirect: '/ssjl-statistics',
  91. name: 'traffic-statistics',
  92. hidden: false,
  93. meta: {
  94. title: '流量统计',
  95. icon: 'el-icon-data-line'
  96. },
  97. children: [
  98. {
  99. path: '/ssjl-statistics',
  100. name: 'ssjl-statistics',
  101. component: () => import('@/views/traffic-statistics/main/ssjl-statistics/index'),
  102. meta: {
  103. title: '家长端流量统计', //收单列表
  104. icon: 'el-icon-office-building'
  105. }
  106. },
  107. ]
  108. },
  109. // 众筹拼单系统
  110. {
  111. path: 'crowd-funding-otrder-system',
  112. component: Layout,
  113. redirect: '/package-manage',
  114. name: 'crowd-funding-otrder-system',
  115. meta: {
  116. title: '众筹拼单系统',
  117. icon: 'el-icon-s-help'
  118. },
  119. children: [
  120. {
  121. path: '/package-manage',
  122. name: 'package-manage',
  123. component: () => import('@/views/crowd-funding-otrder-system/main/package-manage/index'),
  124. meta: {
  125. title: '套餐管理',
  126. icon: 'el-icon-burger'
  127. }
  128. },
  129. {
  130. path: '/crowd-funding-otrder-manage',
  131. name: 'crowd-funding-otrder-manage',
  132. component: () => import('@/views/crowd-funding-otrder-system/main/crowd-funding-otrder-manage/index'),
  133. meta: {
  134. title: '拼单管理',
  135. icon: 'el-icon-c-scale-to-original'
  136. }
  137. },
  138. {
  139. path: '/participants-manage',
  140. name: 'participants-manage',
  141. component: () => import('@/views/crowd-funding-otrder-system/main/participants-manage/index'),
  142. meta: {
  143. title: '参与人管理',
  144. icon: 'el-icon-s-custom'
  145. }
  146. },
  147. {
  148. path: '/order-fulfillment',
  149. name: 'order-fulfillment',
  150. component: () => import('@/views/crowd-funding-otrder-system/main/order-fulfillment/index'),
  151. meta: {
  152. title: '订单执行',
  153. icon: 'el-icon-s-ticket'
  154. }
  155. },
  156. {
  157. path: '/customer-statistics',
  158. name: 'customer-statistics',
  159. component: () => import('@/views/crowd-funding-otrder-system/main/customer-statistics/index'),
  160. meta: {
  161. title: '客户统计',
  162. icon: 'el-icon-s-data'
  163. }
  164. },
  165. {
  166. path: '/rules-setting',
  167. name: 'rules-setting',
  168. component: () => import('@/views/crowd-funding-otrder-system/main/rules-setting/index'),
  169. meta: {
  170. title: '规则设置',
  171. icon: 'el-icon-s-unfold'
  172. }
  173. },
  174. ]
  175. },
  176. // 公众号消息管理
  177. {
  178. path: 'message-manage',
  179. component: Layout,
  180. redirect: '/wechat-fans',
  181. name: 'message-manage',
  182. meta: {
  183. title: '消息发送系统',
  184. icon: 'el-icon-message-solid'
  185. },
  186. children: [
  187. {
  188. path: '/wechat-fans',
  189. name: 'wechat-fans',
  190. component: () => import('@/views/message-manage/main/wechat-fans/index'),
  191. meta: {
  192. title: '公众号粉丝',
  193. icon: 'el-icon-user-solid'
  194. },
  195. hidden: true
  196. },
  197. {
  198. path: '/add-articles',
  199. name: 'add-articles',
  200. component: () => import('@/views/message-manage/main/add-articles/index'),
  201. meta: {
  202. title: '添加文章',
  203. icon: 'el-icon-edit'
  204. },
  205. hidden: true
  206. },
  207. {
  208. path: '/add-mass',
  209. name: 'add-mass',
  210. component: () => import('@/views/message-manage/main/add-mass/index'),
  211. meta: {
  212. title: '添加群发',
  213. icon: 'el-icon-s-promotion'
  214. }
  215. },
  216. {
  217. path: '/mass-list',
  218. name: 'mass-list',
  219. component: () => import('@/views/message-manage/main/mass-list/index'),
  220. meta: {
  221. title: '群发列表',
  222. icon: 'el-icon-document'
  223. }
  224. },
  225. {
  226. path: '/send-details',
  227. name: 'send-details',
  228. component: () => import('@/views/message-manage/main/send-details/index'),
  229. meta: {
  230. title: '发送明细',
  231. icon: 'el-icon-document'
  232. },
  233. hidden: true
  234. },
  235. {
  236. path: '/unsubscribe-list',
  237. name: 'unsubscribe-list',
  238. component: () => import('@/views/message-manage/main/unsubscribe-list/index'),
  239. meta: {
  240. title: '退订列表',
  241. icon: 'el-icon-notebook-2'
  242. },
  243. hidden: true
  244. },
  245. ]
  246. },
  247. // 系统管理 todo
  248. {
  249. path: '/system-manage',
  250. component: Layout,
  251. redirect: '/system-setting',
  252. name: 'system-manage',
  253. meta: {
  254. title: '系统管理',
  255. icon: 'el-icon-s-tools'
  256. },
  257. children: [
  258. {
  259. path: '/system-setting',
  260. name: 'system-setting',
  261. component: () => import('@/views/system-manage/main/system-setting/index'),
  262. meta: {
  263. title: '系统管理', //系统设置
  264. icon: 'el-icon-s-tools'
  265. }
  266. },
  267. ]
  268. },
  269. // 测试,例子
  270. /* {
  271. path: '/off-limits-manage',
  272. component: Layout,
  273. redirect: '/off-limits-manage/off-limits-type',
  274. name: 'off-limits-manage',
  275. meta: {
  276. title: '页面测试',
  277. icon: 'el-icon-s-help'
  278. },
  279. children: [
  280. {
  281. path: 'off-limits-type',
  282. name: 'off-limits-type',
  283. component: () => import('@/views/off-limits-manage/off-limits-main/off-limits-type/index'),
  284. meta: {
  285. title: '测试',
  286. icon: 'el-icon-s-order'
  287. }
  288. },
  289. ]
  290. }, */
  291. // 404 page must be placed at the end !!!
  292. {
  293. path: '*',
  294. redirect: '/404',
  295. hidden: true
  296. }
  297. ]
  298. export const asyncRoutes = [];
  299. const createRouter = () => new Router({
  300. // mode: 'history', // require service support
  301. scrollBehavior: () => ({
  302. y: 0
  303. }),
  304. routes: constantRoutes
  305. })
  306. const router = createRouter()
  307. // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
  308. export function resetRouter() {
  309. const newRouter = createRouter()
  310. router.matcher = newRouter.matcher // reset router
  311. }
  312. export default router