天波h5前端应用
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.

54 satır
2.0KB

  1. /*
  2. * @Date: 2022-01-19 10:08:26
  3. * @LastEditors: JinxChen
  4. * @LastEditTime: 2022-04-13 11:15:53
  5. * @FilePath: \AntpayFrontEnd\src\router\index.js
  6. * @description:
  7. */
  8. import Vue from "vue";
  9. import VueRouter from "vue-router";
  10. import Nprogress from "nprogress";
  11. import "nprogress/nprogress.css";
  12. Vue.use(VueRouter);
  13. const routes = [
  14. { path: '/', redirect: 'index' },
  15. { path: '/index', name: 'index', component: resolve => require(['@/views/AliPayIndex'], resolve) },
  16. { path: '/form', name: 'form', component: resolve => require(['@/views/AliPayForm'], resolve) },
  17. { path: '/redirect', name: 'redirect', component: resolve => require(['@/views/AliPayRedirect'], resolve) },
  18. { path: '/result', name: 'result', component: resolve => require(['@/views/AliPayResult'], resolve) },
  19. { path: '/404', name: 'page-not-found', component: resolve => require(['@/views/page-not-found/index'], resolve) },
  20. // 春雨
  21. { path: '/chunyuForm', name: 'chunyuForm', component: resolve => require(['@/views/chunyu/AliPayForm'], resolve) },
  22. // 组件测试页面
  23. { path: '/compTest', name: 'compTest', component: resolve => require(['@/views/ComponentsTest'], resolve) },
  24. // 新首页
  25. { path: '/index-new', name: 'index-new', component: resolve => require(['@/views/AlipayIndexNew'], resolve) },
  26. { path: '/form-new', name: 'form-new', component: resolve => require(['@/views/AliPayFormNew'], resolve) },
  27. // 分销商模式- 首页
  28. { path: '/index-dealers', name: 'index-dealers', component: resolve => require(['@/views/alipay-dealers/AlipayIndexDealers'], resolve) },
  29. // 分销商模式- 信息录入
  30. { path: '/form-dealers', name: 'form-dealers', component: resolve => require(['@/views/alipay-dealers/AlipayFormDealers'], resolve) },
  31. ];
  32. const router = new VueRouter({
  33. //mode: "history",
  34. base: process.env.BASE_URL,
  35. routes,
  36. });
  37. router.beforeEach((to, form, next) => {
  38. Nprogress.start();
  39. next();
  40. });
  41. router.afterEach(() => {
  42. Nprogress.done();
  43. });
  44. export default router;