|
- /*
- * @Date: 2022-01-19 10:08:26
- * @LastEditors: JinxChen
- * @LastEditTime: 2022-04-13 11:15:53
- * @FilePath: \AntpayFrontEnd\src\router\index.js
- * @description:
- */
- import Vue from "vue";
- import VueRouter from "vue-router";
- import Nprogress from "nprogress";
- import "nprogress/nprogress.css";
-
- Vue.use(VueRouter);
-
- const routes = [
- { path: '/', redirect: 'index' },
- { path: '/index', name: 'index', component: resolve => require(['@/views/AliPayIndex'], resolve) },
- { path: '/form', name: 'form', component: resolve => require(['@/views/AliPayForm'], resolve) },
- { path: '/redirect', name: 'redirect', component: resolve => require(['@/views/AliPayRedirect'], resolve) },
- { path: '/result', name: 'result', component: resolve => require(['@/views/AliPayResult'], resolve) },
- { path: '/404', name: 'page-not-found', component: resolve => require(['@/views/page-not-found/index'], resolve) },
- // 春雨
- { path: '/chunyuForm', name: 'chunyuForm', component: resolve => require(['@/views/chunyu/AliPayForm'], resolve) },
- // 组件测试页面
- { path: '/compTest', name: 'compTest', component: resolve => require(['@/views/ComponentsTest'], resolve) },
- // 新首页
- { path: '/index-new', name: 'index-new', component: resolve => require(['@/views/AlipayIndexNew'], resolve) },
- { path: '/form-new', name: 'form-new', component: resolve => require(['@/views/AliPayFormNew'], resolve) },
-
- // 分销商模式- 首页
- { path: '/index-dealers', name: 'index-dealers', component: resolve => require(['@/views/alipay-dealers/AlipayIndexDealers'], resolve) },
-
- // 分销商模式- 信息录入
- { path: '/form-dealers', name: 'form-dealers', component: resolve => require(['@/views/alipay-dealers/AlipayFormDealers'], resolve) },
-
-
-
- ];
-
- const router = new VueRouter({
- //mode: "history",
- base: process.env.BASE_URL,
- routes,
- });
- router.beforeEach((to, form, next) => {
- Nprogress.start();
- next();
- });
- router.afterEach(() => {
- Nprogress.done();
- });
-
- export default router;
|