index.js 22 KB

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