router.config.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. // eslint-disable-next-line
  2. import {
  3. UserLayout,
  4. BasicLayout,
  5. RouteView,
  6. PageView
  7. } from '@/layouts'
  8. export const asyncRouterMap = [{
  9. path: '/',
  10. name: 'index',
  11. component: BasicLayout,
  12. meta: {
  13. title: '运营后台'
  14. },
  15. redirect: '/home',
  16. children: [{
  17. path: '/home',
  18. name: 'home',
  19. redirect: '/home',
  20. component: PageView,
  21. meta: {
  22. title: '首页',
  23. icon: 'home'
  24. },
  25. hideChildrenInMenu: true,
  26. children: [{
  27. path: '/home',
  28. name: 'home',
  29. component: () => import(/* webpackChunkName: "home" */ '@/views/Home'),
  30. meta: {
  31. title: '首页',
  32. icon: 'home',
  33. hiddenHeaderContent: true
  34. }
  35. }]
  36. },
  37. {
  38. path: '/changePwd',
  39. name: 'changePwd',
  40. hidden: true,
  41. component: () => import(/* webpackChunkName: "changePwd" */ '@/views/user/ChangePwd'),
  42. meta: {
  43. title: '修改密码',
  44. icon: 'home'
  45. }
  46. },
  47. {
  48. path: '/shop',
  49. redirect: '/shop/goods',
  50. component: PageView,
  51. meta: {
  52. title: '商品',
  53. icon: 'shop',
  54. permission: 'M_shop'
  55. },
  56. children: [
  57. {
  58. path: '/shop/goods',
  59. redirect: '/shop/goods/list',
  60. name: 'goodsList',
  61. component: RouteView,
  62. meta: {
  63. title: '商品管理',
  64. icon: 'shopping',
  65. permission: 'M_goodsManage_list'
  66. },
  67. hideChildrenInMenu: true,
  68. children: [{
  69. path: '/shop/goods/list',
  70. name: 'goodsListList',
  71. component: () => import(/* webpackChunkName: "shop" */ '@/views/shop/goodsList.vue'),
  72. meta: {
  73. title: '商品列表',
  74. icon: 'shopping',
  75. hidden: true,
  76. permission: 'M_goodsManage_list'
  77. }
  78. },
  79. {
  80. path: '/shop/goods/add',
  81. name: 'goodsListAdd',
  82. component: () => import(/* webpackChunkName: "shop" */ '@/views/shop/goodsEdit.vue'),
  83. meta: {
  84. title: '新增商品',
  85. icon: 'shopping',
  86. hidden: true,
  87. permission: 'B_goodsManage_add'
  88. }
  89. },
  90. {
  91. path: '/shop/goods/edit/:id',
  92. name: 'goodsListEdit',
  93. component: () => import(/* webpackChunkName: "shop" */ '@/views/shop/goodsEdit.vue'),
  94. meta: {
  95. title: '编辑商品',
  96. icon: 'shopping',
  97. hidden: true,
  98. permission: 'B_goodsManage_edit'
  99. }
  100. }
  101. ]
  102. },
  103. {
  104. path: '/shop/goodsShelves',
  105. name: 'goodsShelves',
  106. component: () => import(/* webpackChunkName: "shop" */ '@/views/shop/goodsShelves.vue'),
  107. meta: {
  108. title: '商品排序',
  109. icon: 'flag',
  110. permission: 'M_goodsShelves_0'
  111. }
  112. },
  113. {
  114. path: '/shopSetting/goodsClass',
  115. name: 'goodsClass',
  116. component: () => import(/* webpackChunkName: "shop" */ '@/views/shopSetting/goodsClass.vue'),
  117. meta: {
  118. title: '商品分类管理',
  119. icon: 'folder',
  120. permission: 'M_goodsClass_list'
  121. }
  122. }
  123. ]
  124. },
  125. {
  126. path: '/order',
  127. redirect: '/order/orderManage',
  128. component: PageView,
  129. meta: {
  130. title: '订单',
  131. icon: 'profile'
  132. // permission: 'M_tenants_list'
  133. },
  134. // hideChildrenInMenu: true,
  135. children: [
  136. {
  137. path: '/order/orderManage',
  138. redirect: '/order/orderManage/list',
  139. name: 'orderManage',
  140. component: RouteView,
  141. meta: {
  142. title: '订单管理',
  143. icon: 'profile'
  144. // permission: 'M_tenants_list'
  145. },
  146. hideChildrenInMenu: true,
  147. children: [
  148. {
  149. path: '/order/orderManage/list',
  150. name: 'orderManageList',
  151. component: () => import(/* webpackChunkName: "order" */ '@/views/shop/shopOrder.vue'),
  152. meta: {
  153. title: '订单列表',
  154. icon: 'shopping',
  155. hidden: true
  156. // permission: 'M_goodsManage_list'
  157. }
  158. },
  159. {
  160. path: '/order/orderManage/detail/:id',
  161. name: 'orderManageDetail',
  162. component: () => import(/* webpackChunkName: "order" */ '@/views/shop/orderDetail.vue'),
  163. meta: {
  164. title: '订单详情',
  165. icon: 'profile',
  166. hidden: true
  167. // permission: 'M_tenants_list'
  168. }
  169. }
  170. ]
  171. }
  172. ]
  173. },
  174. // 用户
  175. {
  176. path: '/userInfo',
  177. redirect: '/userInfo/userManageList',
  178. component: PageView,
  179. meta: {
  180. title: '用户',
  181. icon: 'user'
  182. // permission: 'M_shop'
  183. },
  184. children: [
  185. {
  186. path: '/userInfo/userManage',
  187. redirect: '/userInfo/userManageList/list',
  188. name: 'userManageList',
  189. component: RouteView,
  190. meta: {
  191. title: '用户管理',
  192. icon: 'profile'
  193. // permission: 'M_tenants_list'
  194. },
  195. hideChildrenInMenu: true,
  196. children: [{
  197. path: '/userInfo/userManageList/list',
  198. name: 'userManageList',
  199. component: () => import(/* webpackChunkName: "userInfo" */ '@/views/userInfo/userManageList.vue'),
  200. meta: {
  201. title: '用户列表',
  202. icon: 'team',
  203. hidden: true
  204. // permission: 'M_tenants_list'
  205. }
  206. },
  207. {
  208. path: '/userInfo/userManageList_user/detail/:id',
  209. name: 'userManageDetail',
  210. component: () => import(/* webpackChunkName: "userInfo" */ '@/views/userInfo/userDetails.vue'),
  211. meta: {
  212. title: '用户详情',
  213. icon: 'profile',
  214. hidden: true
  215. // permission: 'M_tenants_list'
  216. }
  217. },
  218. {
  219. path: '/userInfo/userManageList_Ld/detail/:id',
  220. name: 'ledouDetail',
  221. component: () => import(/* webpackChunkName: "userInfo" */ '@/views/userInfo/LdDetails.vue'),
  222. meta: {
  223. title: '乐豆详情',
  224. icon: 'profile',
  225. hidden: true
  226. // permission: 'M_tenants_list'
  227. }
  228. }
  229. ]
  230. },
  231. {
  232. path: '/userInfo/releaseRecord/list',
  233. name: 'releaseRecordList',
  234. component: () => import(/* webpackChunkName: "userInfo" */ '@/views/releaseRecord/releaseRecordList.vue'),
  235. meta: {
  236. title: '投放记录',
  237. icon: 'container'
  238. // permission: 'M_tenants_list'
  239. }
  240. }]
  241. },
  242. {
  243. path: '/shopSetting',
  244. redirect: '/shopSetting/bannerSetting',
  245. component: PageView,
  246. meta: {
  247. title: '商城设置',
  248. icon: 'appstore',
  249. permission: 'M_shopSetting'
  250. },
  251. children: [
  252. {
  253. path: '/shopSetting/bannerSetting',
  254. name: 'bannerSetting',
  255. component: () => import(/* webpackChunkName: "shopSetting" */ '@/views/shop/bannerSetting.vue'),
  256. meta: {
  257. title: '推广位设置',
  258. icon: 'picture'
  259. // permission: 'M_AdBanner_list'
  260. }
  261. }
  262. ]
  263. },
  264. {
  265. path: '/equipmentManage',
  266. redirect: '/equipmentManage/network',
  267. component: PageView,
  268. meta: {
  269. title: '网点/设备',
  270. icon: 'apartment'
  271. // permission: 'M_tenants_list'
  272. },
  273. children: [{
  274. path: '/equipmentManage/network',
  275. name: 'network',
  276. component: () => import(/* webpackChunkName: "equipmentManage" */ '@/views/equipmentManage/network/network.vue'),
  277. meta: {
  278. title: '网点管理',
  279. icon: 'cluster'
  280. // permission: 'M_tenants_list'
  281. }
  282. },
  283. {
  284. path: '/equipmentManage/equipment',
  285. name: 'equipment',
  286. component: () => import(/* webpackChunkName: "equipmentManage" */ '@/views/equipmentManage/equipment/equipment.vue'),
  287. meta: {
  288. title: '设备管理',
  289. icon: 'usb'
  290. // permission: 'M_tenants_list'
  291. }
  292. },
  293. {
  294. path: '/equipmentManage/boxSetting',
  295. name: 'boxSetting',
  296. component: () => import(/* webpackChunkName: "equipmentManage" */ '@/views/equipmentManage/boxSetting/boxSetting.vue'),
  297. meta: {
  298. title: '箱体类型设置',
  299. icon: 'block'
  300. // permission: 'M_tenants_list'
  301. }
  302. },
  303. {
  304. path: '/equipmentManage/exchangeSetting',
  305. name: 'exchangeSetting',
  306. component: () => import(/* webpackChunkName: "equipmentManage" */
  307. '@/views/equipmentManage/exchangeSetting/ExchangeSetting.vue'),
  308. meta: {
  309. title: '兑换规则设置',
  310. icon: 'build'
  311. // permission: 'M_tenants_list'
  312. }
  313. },
  314. {
  315. path: '/equipmentManage/openTimeSetting',
  316. name: 'openTimeSetting',
  317. component: () => import(/* webpackChunkName: "equipmentManage" */ '@/views/equipmentManage/openTimeSetting/OpenTimeSetting.vue'),
  318. meta: {
  319. title: '投放时间设置',
  320. icon: 'dashboard'
  321. // permission: 'M_tenants_list'
  322. }
  323. }
  324. ]
  325. },
  326. {
  327. path: '/businessManage',
  328. redirect: '/businessManag/userManage',
  329. component: PageView,
  330. meta: {
  331. title: '乐享亭',
  332. icon: 'bank',
  333. permission: 'M_partnerManage'
  334. },
  335. children: [
  336. {
  337. path: '/businessManage/partnerManage',
  338. name: 'partnerManage',
  339. component: () => import(/* webpackChunkName: "businessManage" */ '@/views/businessManage/partnerManage/partnerManage.vue'),
  340. meta: {
  341. title: '商户管理',
  342. icon: 'solution',
  343. permission: 'M_partnerManage_list'
  344. }
  345. },
  346. {
  347. path: '/businessManage/userManage',
  348. name: 'userManage',
  349. component: () => import(/* webpackChunkName: "businessManage" */ '@/views/businessManage/userManage/userManage.vue'),
  350. meta: {
  351. title: '用户管理',
  352. icon: 'folder'
  353. // permission: 'M_tenants_list'
  354. }
  355. }
  356. ]
  357. },
  358. {
  359. path: '/supplier',
  360. redirect: '/supplier/list',
  361. component: PageView,
  362. meta: {
  363. title: '供货商',
  364. icon: 'user-add',
  365. permission: 'M_shopSetting'
  366. },
  367. children: [
  368. {
  369. path: '/supplier/list',
  370. name: 'supplier',
  371. component: () => import(/* webpackChunkName: "supplier" */ '@/views/shopSetting/supplier.vue'),
  372. meta: {
  373. title: '供货商管理',
  374. icon: 'solution',
  375. permission: 'M_supplier_list'
  376. }
  377. }
  378. ]
  379. },
  380. // auth
  381. {
  382. path: '/auth',
  383. redirect: '/auth/userList',
  384. component: PageView,
  385. meta: {
  386. title: '权限管理',
  387. icon: 'lock'
  388. // permission: 'M_auth_0'
  389. },
  390. children: [
  391. {
  392. path: '/auth/userList',
  393. name: 'powerUserList',
  394. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
  395. meta: {
  396. title: '用户管理',
  397. icon: 'user'
  398. // permission: 'M_auth_userList'
  399. }
  400. },
  401. {
  402. path: '/auth/roleList',
  403. name: 'powerRoleList',
  404. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
  405. meta: {
  406. title: '角色管理',
  407. icon: 'solution'
  408. // permission: 'M_auth_roleList'
  409. }
  410. },
  411. {
  412. path: '/menusAuth/menu',
  413. name: 'powerMenu',
  414. component: () => import(/* webpackChunkName: "auth" */ '@/views/power/menu/menu.vue'),
  415. meta: {
  416. title: '菜单管理',
  417. icon: 'profile'
  418. // permission: 'M_menusAuth_menu'
  419. }
  420. }
  421. ]
  422. },
  423. {
  424. path: '/setting',
  425. redirect: '/setting/userList',
  426. component: PageView,
  427. meta: {
  428. title: '系统设置',
  429. icon: 'setting'
  430. // permission: 'M_setting_0'
  431. },
  432. children: [{
  433. path: '/setting/dataDictionary',
  434. name: 'powerDD',
  435. component: () => import(/* webpackChunkName: "setting" */
  436. '@/views/power/dataDictionary/dataDictionary.vue'),
  437. meta: {
  438. title: '数据字典管理',
  439. icon: 'database'
  440. // permission: 'M_sys_dataDictionary'
  441. }
  442. },
  443. {
  444. path: '/setting/OperateJournal',
  445. name: 'powerOperateJournal',
  446. component: () => import(/* webpackChunkName: "setting" */
  447. '@/views/power/OperateJournal/OperateJournal.vue'),
  448. meta: {
  449. title: '操作日志',
  450. icon: 'read'
  451. // permission: 'M_operateJournal'
  452. }
  453. }
  454. ]
  455. }
  456. ]
  457. },
  458. {
  459. path: '*',
  460. redirect: '/404',
  461. hidden: true
  462. }
  463. ]
  464. /**
  465. * 基础路由
  466. * @type { *[] }
  467. */
  468. export const constantRouterMap = [{
  469. path: '/user',
  470. component: UserLayout,
  471. redirect: '/user/login',
  472. hidden: true,
  473. children: [{
  474. path: 'login',
  475. name: 'login',
  476. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  477. },
  478. {
  479. path: 'register',
  480. name: 'register',
  481. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  482. },
  483. {
  484. path: 'register-result',
  485. name: 'registerResult',
  486. component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  487. },
  488. {
  489. path: 'recover',
  490. name: 'recover',
  491. component: undefined
  492. }
  493. ]
  494. },
  495. {
  496. path: '/404',
  497. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  498. }
  499. ]