index.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import layout from '../views/layout/layout'
  4. const _import = require('./_import_' + process.env.NODE_ENV)
  5. if(Router.version >= '3.1.0'){
  6. const originalPush = Router.prototype.push
  7. Router.prototype.push = function push(location) {
  8. return originalPush.call(this, location).catch(err => err)
  9. }
  10. }
  11. Vue.use(Router)
  12. export const constantRouterMap = [
  13. {path: '/', redirect: '/login'},
  14. {path: '/login', component: _import('login/index'), name: 'login'},
  15. {path: '/login-by-backend', component: _import('login/login-by-backend'), name: 'login-by-backend'},
  16. {path: '/modify-password/:username', component: _import('login/modify-password'), name: 'modify-password'},
  17. // { path: '/authredirect', component: _import('login/authredirect'), hidden: true },
  18. // { path: '/404', component: _import('errorPage/404'), hidden: true },
  19. // { path: '/401', component: _import('errorPage/401'), hidden: true },
  20. {
  21. path: '/dashboard/index',
  22. component: layout,
  23. redirect: '/dashboard/index',
  24. children: [{
  25. path: '/dashboard/index',
  26. component: _import('dashboard/index'),
  27. name: 'dashboard_index',
  28. meta: {
  29. title: 'Dashboard',//控制台
  30. breadcrumb: [
  31. {title: 'Dashboard', path: '/dashboard/index'},//首页
  32. ],
  33. },
  34. }]
  35. },
  36. {
  37. path: '/shop',
  38. component: layout,
  39. redirect: '/shop/dec-order-list',
  40. children: [
  41. {
  42. path: '/shop/dec-order-list',
  43. component: _import('shop/dec-order-list'),
  44. name: 'shop_dec-order-list',
  45. meta: {
  46. title: 'Welcome Pack Listing',//报单列表
  47. breadcrumb: [
  48. {title: 'Dashboard', path: '/dashboard/index'},//首页
  49. {title: 'Shopping Mall', path: '/shop/dec-order-list'},//商城管理
  50. ],
  51. },
  52. },
  53. {
  54. path: '/shop/order-list',
  55. component: _import('shop/order-list'),
  56. name: 'shop_order-list',
  57. meta: {
  58. title: 'Order List',//订单列表
  59. breadcrumb: [
  60. {title: 'Dashboard', path: '/dashboard/index'},//首页
  61. {title: 'Shopping Mall', path: '/shop/dec-order-list'},//商城管理
  62. ],
  63. },
  64. },
  65. {
  66. path: '/shop/index',
  67. component: _import('shop/index'),
  68. name: 'shop_index',
  69. meta: {
  70. title: 'Products list',//商品列表
  71. breadcrumb: [
  72. {title: 'Dashboard', path: '/dashboard/index'},//首页
  73. {title: 'Shopping Mall', path: '/shop/dec-order-list'},//商城管理
  74. ],
  75. },
  76. },
  77. {
  78. path: '/shop/order-backing-out',
  79. component: _import('shop/order-backing-out'),
  80. name: 'shop_order-list',
  81. meta: {
  82. title: '订单退货',//订单退货
  83. breadcrumb: [
  84. {title: 'Dashboard', path: '/dashboard/index'},//首页
  85. {title: 'Shopping Mall', path: '/shop/dec-order-list'},//商城管理
  86. ],
  87. }
  88. },
  89. {
  90. path: '/shop/order',
  91. component: _import('shop/order'),
  92. name: 'shop_order',
  93. meta: {
  94. title: 'Products settlement',
  95. breadcrumb: [
  96. {title: 'Dashboard', path: '/dashboard/index'},//首页
  97. {title: 'Shopping Mall', path: '/shop/dec-order-list'}//商城管理
  98. ],
  99. },
  100. },
  101. {
  102. path: '/shop/goods-detail/:id',
  103. component: _import('shop/goods-detail'),
  104. name: 'shop_goods-detail',
  105. meta: {
  106. title: '商品详情',
  107. breadcrumb: [
  108. {title: 'Dashboard', path: '/dashboard/index'},
  109. {title: 'Shopping Mall', path: '/shop/dec-order-list'},
  110. ],
  111. },
  112. },
  113. {
  114. path: '/shop/ba-product-list',
  115. component: _import('shop/ba-product-list'),
  116. name: 'ba_product_list',
  117. meta: {
  118. title: 'Products list',//BA商品列表
  119. breadcrumb: [
  120. {title: 'Dashboard', path: '/dashboard/index'},//首页
  121. {title: 'Shopping Mall', path: '/shop/ba-product-list'},//商城管理
  122. ],
  123. },
  124. },
  125. {
  126. path: '/shop/ba-shopping-cart',
  127. component: _import('shop/ba-shopping-cart'),
  128. name: 'ba-shopping-cart',
  129. meta: {
  130. title: 'Products settlement', // 购物车
  131. breadcrumb: [
  132. {title: 'Dashboard', path: '/dashboard/index'},//首页
  133. {title: 'Shopping Mall', path: '/shop/ba-product-list'}//商城管理
  134. ],
  135. },
  136. },
  137. {
  138. path: '/shop/ba-order-list',
  139. component: _import('shop/ba-order-list'),
  140. name: 'ba_order_list',
  141. meta: {
  142. title: 'Order List', // BA订单列表
  143. breadcrumb: [
  144. {title: 'Dashboard', path: '/dashboard/index'},//首页
  145. {title: 'Shopping Mall', path: '/shop/ba-product-list'}//商城管理
  146. ],
  147. },
  148. },
  149. // {
  150. // path: '/shop/reconsume',
  151. // component: _import('shop/reconsume'),
  152. // name: 'shop_reconsume',
  153. // meta: {
  154. // title: '复消商品',
  155. // breadcrumb: [
  156. // {title: '首页', path: '/dashboard/index'},
  157. // {title: '商城管理', path: '/shop/dec-order-list'},
  158. // ],
  159. // },
  160. // },
  161. // {
  162. // path: '/shop/reconsume-order',
  163. // component: _import('shop/reconsume-order'),
  164. // name: 'reconsume-order',
  165. // meta: {
  166. // title: '复消商品结算',
  167. // breadcrumb: [
  168. // {title: '首页', path: '/dashboard/index'},
  169. // {title: '商城管理', path: '/shop/dec-order-list'}
  170. // ],
  171. // },
  172. // },
  173. ],
  174. },
  175. {
  176. path: '/user',
  177. component: layout,
  178. redirect: '/user/index',
  179. children: [
  180. {
  181. path: '/user/index',
  182. component: _import('user/index'),
  183. name: 'user_index',
  184. meta: {
  185. title: 'Personal info',//个人资料
  186. breadcrumb: [
  187. {title: 'Dashboard', path: '/dashboard/index'},//首页
  188. {title: 'Member management', path: '/user/index'},//会员管理
  189. ],
  190. },
  191. },
  192. {
  193. path: '/user/password',
  194. component: _import('user/password'),
  195. name: 'user_password',
  196. meta: {
  197. title: 'Reset Password',//重置密码
  198. breadcrumb: [
  199. {title: 'Dashboard', path: '/dashboard/index'},//首页
  200. {title: 'Member management', path: '/user/index'},//会员管理
  201. ],
  202. },
  203. },
  204. {
  205. path: '/user/id-card',
  206. component: _import('user/id-card'),
  207. name: 'user_id-card',
  208. meta: {
  209. title: '上传身份证',
  210. breadcrumb: [
  211. {title: 'Dashboard', path: '/dashboard/index'},
  212. {title: 'Member management', path: '/user/index'},
  213. ],
  214. },
  215. },
  216. {
  217. path: '/user/rec-user',
  218. component: _import('user/rec-user'),
  219. name: 'user_rec-user',
  220. meta: {
  221. title: '开拓会员列表',
  222. breadcrumb: [
  223. {title: 'Dashboard', path: '/dashboard/index'},
  224. {title: 'Member management', path: '/user/index'},
  225. ],
  226. },
  227. },
  228. {
  229. path: '/user/bind',
  230. component: _import('user/bind'),
  231. name: 'user_bind',
  232. meta: {
  233. title: '点位绑定列表',
  234. breadcrumb: [
  235. {title: 'Dashboard', path: '/dashboard/index'},
  236. {title: 'Member management', path: '/user/index'},
  237. ],
  238. },
  239. },
  240. {
  241. path: '/user/bind-edit/:id',
  242. component: _import('user/bind-edit'),
  243. name: 'user_bind-edit',
  244. meta: {
  245. title: '点位绑定编辑',
  246. highLight: '/user/bind',
  247. breadcrumb: [
  248. {title: 'Dashboard', path: '/dashboard/index'},
  249. {title: 'Member management', path: '/user/index'},
  250. {title: '点位绑定列表', path: '/user/bind'},
  251. ],
  252. },
  253. },
  254. {
  255. path: '/user/dec',
  256. component: _import('user/dec'),
  257. name: 'user_dec',
  258. meta: {
  259. title: 'Welcome Pack management',//报单管理
  260. breadcrumb: [
  261. {title: 'Dashboard', path: '/dashboard/index'},//首页
  262. {title: 'Member management', path: '/user/index'},//会员管理
  263. ],
  264. },
  265. },
  266. {
  267. path: '/user/upgrade',
  268. component: _import('user/upgrade'),
  269. name: 'user_upgrade',
  270. meta: {
  271. title: 'Upgrade management',//升级管理
  272. highLight: '/user/bind',
  273. breadcrumb: [
  274. {title: 'Dashboard', path: '/dashboard/index'},//首页
  275. {title: 'Member management', path: '/user/index'},//会员管理
  276. ],
  277. },
  278. },
  279. {
  280. path: '/user/ba-info',
  281. component: _import('user/ba-info'),
  282. name: 'ba-info',
  283. meta: {
  284. title: 'Personal Info',//个人资料
  285. breadcrumb: [
  286. {title: 'Dashboard', path: '/dashboard/index'},//首页
  287. {title: 'Member management', path: '/user/ba-info'},//会员管理
  288. ],
  289. },
  290. },
  291. {
  292. path: '/user/ba-password',
  293. component: _import('user/ba-password'),
  294. name: 'ba-password',
  295. meta: {
  296. title: 'Reset Password',//重置密码
  297. breadcrumb: [
  298. {title: 'Dashboard', path: '/dashboard/index'},//首页
  299. {title: 'Member management', path: '/user/ba-info'},//会员管理
  300. ],
  301. },
  302. },
  303. ]
  304. },
  305. {
  306. path: '/atlas',
  307. component: layout,
  308. redirect: '/atlas/network',
  309. children: [
  310. {
  311. path: '/atlas/network',
  312. component: _import('atlas/network'),
  313. name: 'atlas_network',
  314. meta: {
  315. title: 'Placement network',
  316. breadcrumb: [
  317. {title: 'Dashboard', path: '/dashboard/index'},
  318. {title: 'Network Chart', path: '/atlas/network'},
  319. ],
  320. },
  321. },
  322. ]
  323. },
  324. {
  325. path: '/bonus',
  326. component: layout,
  327. redirect: '/bonus/index',
  328. children: [
  329. {
  330. path: '/bonus/index',
  331. component: _import('bonus/index'),
  332. name: 'bonus_index',
  333. meta: {
  334. title: 'My account',//我的账户
  335. breadcrumb: [
  336. {title: 'Dashboard', path: '/dashboard/index'},//首页
  337. {title: 'Bonus management', path: '/bonus/index'},//奖金管理
  338. ],
  339. },
  340. },
  341. {
  342. path: '/bonus/new',
  343. component: _import('bonus/new'),
  344. name: 'bonus_new',
  345. meta: {
  346. title: '最新奖金',
  347. breadcrumb: [
  348. {title: 'Dashboard', path: '/dashboard/index'},
  349. {title: 'Bonus management', path: '/bonus/index'},
  350. ],
  351. },
  352. },
  353. {
  354. path: '/bonus/other',
  355. component: _import('bonus/other'),
  356. name: 'bonus_other',
  357. meta: {
  358. title: 'Previous bonus',//往期奖金
  359. breadcrumb: [
  360. {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
  361. {title: 'Bonus management', path: '/bonus/index'},//奖金管理
  362. ],
  363. },
  364. },
  365. {
  366. path: '/bonus/historical-cumulative-bonus',
  367. component: _import('bonus/historical-cumulative-bonus'),
  368. name: 'historical-cumulative-bonus',
  369. meta: {
  370. title: 'Historical cumulative bonus',//往期历史奖金累积
  371. breadcrumb: [
  372. {title: 'Dashboard', path: '/dashboard/index'},//Dashboard
  373. {title: 'Bonus management', path: '/bonus/index'},//奖金管理
  374. ],
  375. },
  376. },
  377. {
  378. path: '/bonus/real-time-perf',
  379. component: _import('bonus/real-time-perf'),
  380. name: 'bonus_real-time-perf',
  381. meta: {
  382. title: '实时业绩',
  383. breadcrumb: [
  384. {title: 'Dashboard', path: '/dashboard/index'},
  385. {title: 'Bonus management', path: '/bonus/index'},
  386. ],
  387. },
  388. },
  389. {
  390. path: '/bonus/fc-point',
  391. component: _import('bonus/fc-point'),
  392. name: 'bonus_fc-point',
  393. meta: {
  394. title: '房产积分',
  395. breadcrumb: [
  396. {title: 'Dashboard', path: '/dashboard/index'},
  397. {title: 'Bonus management', path: '/bonus/index'},
  398. ],
  399. },
  400. },
  401. ]
  402. },
  403. {
  404. path: '/article',
  405. component: layout,
  406. redirect: '/article/list',
  407. children: [
  408. {
  409. path: '/article/list/:cid',
  410. component: _import('article/list'),
  411. name: 'article_list',
  412. meta: {
  413. title: 'Article List',
  414. breadcrumb: [
  415. {title: 'Dashboard', path: '/dashboard/index'},
  416. {title: 'Article Management', path: '/article/list'},
  417. ],
  418. },
  419. },
  420. {
  421. path: '/article/detail/:id',
  422. component: _import('article/detail'),
  423. name: 'article_detail',
  424. meta: {
  425. title: 'Article Detail',
  426. breadcrumb: [
  427. {title: 'Dashboard', path: '/dashboard/index'},
  428. {title: 'Article Management', path: '/article/list'},
  429. ],
  430. },
  431. },
  432. ]
  433. },
  434. {
  435. path: '/message',
  436. component: layout,
  437. redirect: '/message/list',
  438. children: [
  439. {
  440. path: '/message/list',
  441. component: _import('message/list'),
  442. name: 'message_list',
  443. meta: {
  444. title: '站内信列表',
  445. breadcrumb: [
  446. {title: 'Dashboard', path: '/dashboard/index'},
  447. {title: '站内信', path: '/message/list'},
  448. ],
  449. },
  450. },
  451. {
  452. path: '/message/detail/:id',
  453. component: _import('message/detail'),
  454. name: 'message_detail',
  455. meta: {
  456. title: '站内信详情',
  457. breadcrumb: [
  458. {title: 'Dashboard', path: '/dashboard/index'},
  459. {title: '站内信', path: '/message/list'},
  460. ],
  461. },
  462. },
  463. ]
  464. },
  465. {
  466. path: '/finance',
  467. component: layout,
  468. redirect: '/finance/withdraw',
  469. children: [
  470. {
  471. path: '/finance/reconsume-pool-flow',
  472. component: _import('finance/reconsume-pool-flow'),
  473. name: 'finance_reconsume-pool-flow',
  474. meta: {
  475. title: '会员复销池余额流水',
  476. breadcrumb: [
  477. {title: 'Dashboard', path: '/dashboard/index'},
  478. {title: 'Financial management', path: '/finance/withdraw'},
  479. ],
  480. },
  481. },
  482. {
  483. path: '/finance/withdraw',
  484. component: _import('finance/withdraw'),
  485. name: 'finance_withdraw',
  486. meta: {
  487. title: 'Withdrawal details',//提现明细
  488. breadcrumb: [
  489. {title: 'Dashboard', path: '/dashboard/index'},//首页
  490. {title: 'Financial management', path: '/finance/index'},//财务管理
  491. ],
  492. },
  493. },
  494. {
  495. path: '/finance/withdraw-add',
  496. component: _import('finance/withdraw-add'),
  497. name: 'finance_withdraw-add',
  498. meta: {
  499. title: 'Withdraw',//我要提现
  500. highLight: '/finance/withdraw',
  501. breadcrumb: [
  502. {title: 'Dashboard', path: '/dashboard/index'},//首页
  503. {title: 'Financial management', path: '/finance/index'},//财务管理
  504. {title: 'Withdrawal details', path: '/finance/withdraw'},//提现明细
  505. ],
  506. },
  507. },
  508. {
  509. path: '/finance/dec-list',
  510. component: _import('finance/dec-list'),
  511. name: 'finance_dec-list',
  512. meta: {
  513. title: '报单订货单列表',
  514. breadcrumb: [
  515. {title: 'Dashboard', path: '/dashboard/index'},
  516. {title: 'Financial management', path: '/finance/index'},
  517. ],
  518. },
  519. },
  520. {
  521. path: '/finance/transfer-list',
  522. component: _import('finance/transfer-list'),
  523. name: 'finance_transfer-list',
  524. meta: {
  525. title: 'Transfer',
  526. breadcrumb: [
  527. {title: 'Dashboard', path: '/dashboard/index'},
  528. {title: 'Financial management', path: '/finance/index'},
  529. ],
  530. },
  531. },
  532. {
  533. path: '/finance/transfer-add',
  534. component: _import('finance/transfer-add'),
  535. name: 'finance_transfer-add',
  536. meta: {
  537. title: 'Transfer',
  538. highLight: '/finance/transfer-list',
  539. breadcrumb: [
  540. {title: 'Dashboard', path: '/dashboard/index'},
  541. {title: 'Financial management', path: '/finance/index'},
  542. ],
  543. },
  544. },
  545. {
  546. path: '/finance/recharge',
  547. component: _import('finance/recharge'),
  548. name: 'finance_recharge',
  549. meta: {
  550. title: 'Recharge details', // 充值明细
  551. breadcrumb: [
  552. {title: 'Dashboard', path: '/dashboard/index'}, // 首页
  553. {title: 'financial management', path: '/finance/index'}, // 财务管理
  554. ],
  555. },
  556. },
  557. {
  558. path: '/finance/recharge-add',
  559. component: _import('finance/recharge-add'),
  560. name: 'finance_recharge-add',
  561. meta: {
  562. title: 'Recharge', // 我要充值
  563. highLight: '/finance/recharge',
  564. breadcrumb: [
  565. {title: 'Dashboard', path: '/dashboard/index'}, // 首页
  566. {title: 'financial management', path: '/finance/index'}, // 财务管理
  567. {title: 'Recharge details', path: '/finance/recharge'},
  568. ],
  569. },
  570. },
  571. ]
  572. },
  573. {
  574. path: '/config',
  575. component: layout,
  576. redirect: '/config/base',
  577. children: [
  578. {
  579. path: '/config/receive-address-list',
  580. component: _import('config/receive-address-list'),
  581. name: 'config_receive-address-list',
  582. meta: {
  583. title: 'Shipping Address',//收货地址管理
  584. breadcrumb: [
  585. {title: 'Dashboard', path: '/dashboard/index'},//首页
  586. {title: 'Setting', path: '/config/base'},//设置
  587. ],
  588. },
  589. },
  590. {
  591. path: '/config/receive-address-add',
  592. component: _import('config/receive-address-edit'),
  593. name: 'config_receive-address-add',
  594. meta: {
  595. title: 'Add shipping address',//添加收货地址
  596. highLight: '/config/receive-address-list',
  597. breadcrumb: [
  598. {title: 'Dashboard', path: '/dashboard/index'},//首页
  599. {title: 'Setting', path: '/config/base'},//设置
  600. {title: 'Shipping Address', path: '/config/receive-address-list'},//收货地址管理
  601. ],
  602. },
  603. },
  604. {
  605. path: '/config/receive-address-edit/:id',
  606. component: _import('config/receive-address-edit'),
  607. name: 'config_receive-address-edit',
  608. meta: {
  609. title: 'Edit address',
  610. highLight: '/config/receive-address-list',
  611. breadcrumb: [
  612. {title: 'Dashboard', path: '/dashboard/index'},//首页
  613. {title: 'Setting', path: '/config/base'},//设置
  614. {title: 'Shipping Address', path: '/config/receive-address-list'},//收货地址管理
  615. ],
  616. },
  617. },
  618. {
  619. path: '/config/ba-receive-address-list',
  620. component: _import('config/ba-receive-address-list'),
  621. name: 'ba-receive-address-list',
  622. meta: {
  623. title: 'Shipping Address',//收货地址管理
  624. breadcrumb: [
  625. {title: 'Dashboard', path: '/dashboard/index'},//首页
  626. {title: 'Setting', path: '/config/ba-receive-address-list'},//设置
  627. ],
  628. },
  629. },
  630. {
  631. path: '/config/ba-receive-address-add',
  632. component: _import('config/ba-receive-address-edit'),
  633. name: 'ba-receive-address-add',
  634. meta: {
  635. title: 'Add Shipping Address',//添加收货地址
  636. highLight: '/config/ba-receive-address-list',
  637. breadcrumb: [
  638. {title: 'Dashboard', path: '/dashboard/index'},//首页
  639. {title: 'Setting', path: '/config/ba-receive-address-list'},//设置
  640. {title: 'Shipping Address', path: '/config/ba-receive-address-list'},//收货地址管理
  641. ],
  642. },
  643. },
  644. {
  645. path: '/config/ba-receive-address-edit/:id',
  646. component: _import('config/ba-receive-address-edit'),
  647. name: 'ba-receive-address-edit',
  648. meta: {
  649. title: 'Edit Address',
  650. highLight: '/config/ba-receive-address-list',
  651. breadcrumb: [
  652. {title: 'Dashboard', path: '/dashboard/index'},//首页
  653. {title: 'Setting', path: '/config/ba-receive-address-list'},//设置
  654. {title: 'Shipping Address', path: '/config/ba-receive-address-list'},//收货地址管理
  655. ],
  656. },
  657. },
  658. ]
  659. },
  660. ]
  661. export default new Router({
  662. routes: constantRouterMap
  663. })