/*
 * @Date: 2023-09-21 09:54:53
 * @LastEditors: JinxChen
 * @LastEditTime: 2023-11-03 09:41:28
 * @FilePath: \TelpoH5FrontendWeb\src\router\index.js
 * @description:
 */
/*
 * @Date: 2023-06-01 18:41:50
 * @LastEditors: JinxChen
 * @LastEditTime: 2023-10-10 15:56:50
 * @FilePath: \TelpoH5FrontendWeb\src\router\index.js
 * @description:
 */
/*
 * @Date: 2023-05-30 15:37:06
 * @LastEditors: JinxChen
 * @LastEditTime: 2023-06-01 09:48:23
 * @FilePath: \TelpoH5FrontendWeb\src\router\index.js
 * @description:
 */
/*
 * @Date: 2023-02-25 16:34:35
 * @LastEditors: JinxChen
 * @LastEditTime: 2023-05-30 11:05:35
 * @FilePath: \TelpoH5FrontendWeb\src\router\index.js
 * @description:
 */
/*
 * @Date: 2022-01-19 10:08:26
 * @LastEditors: JinxChen
 * @LastEditTime: 2023-02-25 16:33:59
 * @FilePath: \TelpoH5FrontendWeb\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/index'], resolve) },
    { path: '/packageHome', name: 'packageHome', component: resolve => require(['@/views/package-home'], resolve) },
    { path: '/packageList', name: 'packageList', component: resolve => require(['@/views/package-list'], resolve) },
    { path: '/payResult', name: 'payResult', component: resolve => require(['@/views/pay-result'], resolve) },
    { path: '/cardInfo', name: 'cardInfo', component: resolve => require(['@/views/card-info'], resolve) },
    { path: '/packageBuy', name: 'packageBuy', component: resolve => require(['@/views/package-buy'], resolve) },
    { path: '/buyRecord', name: 'buyRecord', component: resolve => require(['@/views/buy-record'], resolve) },
    { path: '/activeStatus', name: 'activeStatus', component: resolve => require(['@/views/active-status'], resolve) },
    { path: '/cardActive', name: 'cardActive', component: resolve => require(['@/views/card-active'], resolve) },

    { path: '/alarmDetails', name: 'alarmDetails', component: resolve => require(['@/views/alarm/alarm-details'], resolve) },

    // 心理监测
    { path: '/PsychologicalModeling', name: 'PsychologicalModeling', component: resolve => require(['@/views/psychological-modeling'], resolve) },
    { path: '/PsychologicalQuestionnaire', name: 'PsychologicalQuestionnaire', component: resolve => require(['@/views/psychological-questionnaire'], resolve) },
    { path: '/PsychologicalScale', name: 'PsychologicalScale', component: resolve => require(['@/views/psychological-scale'], resolve) },
    { path: '/PsychologicalScaleDetail', name: 'PsychologicalScaleDetail', component: resolve => require(['@/views/psychological-scale/detail'], resolve) },
    { path: '/PsychologicalScaleList', name: 'PsychologicalScaleList', component: resolve => require(['@/views/psychological-scale/list'], resolve) },

    // 健康-心理监测详情，抑郁，压力和疲劳
    { path: '/psychological', name: 'psychological', component: resolve => require(['@/views/health/psychological'], resolve) },
    // 健康-抑郁，压力和疲劳汇总入口
    { path: '/psychologicalMain', name: 'psychologicalMain', component: resolve => require(['@/views/health/psychological-main'], resolve) },
    // 周报/月报
    { path: '/psychologicalReport', name: 'psychologicalReport', component: resolve => require(['@/views/health/psychological/report/index'], resolve) },
    // 周报/月报-入口
    { path: '/psychiclReportEntry', name: 'psychiclReportEntry', component: resolve => require(['@/views/health/psychological/report/report-entry'], resolve) },
    // 周报/月报
    { path: '/reportDetails', name: 'reportDetails', component: resolve => require(['@/views/health/psychological/reportDetails/index'], resolve) },

    // 告警详情-中间页
    { path: '/aiCallAlarm', name: 'aiCallAlarm', component: resolve => require(['@/views/ai-call-alarm'], resolve) },
    // 物联网卡错误页
    { path: '/iotcardError', name: 'iotcardError', component: resolve => require(['@/views/error-pages/iotcard-error'], resolve) },
    // c1（4g管理后台）设备耗电情况页面
    { path: '/devicePower', name: 'devicePower', component: resolve => require(['@/views/gps-card-frontend/device-power'], resolve) },
    // c1（4g管理后台）设备设置页面
    { path: '/deviceSetting', name: 'deviceSetting', component: resolve => require(['@/views/gps-card-frontend/device-setting'], resolve) },
    // c1（4g管理后台）涉水区域白名单
    { path: '/drownWhiteList', name: 'drownWhiteList', component: resolve => require(['@/views/gps-card-frontend/drown-white-list'], resolve) },
    { path: '/smartCard', name: 'smartCard', component: resolve => require(['@/views/smart-card/index'], 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;
