123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- import Vue from 'vue';
- import VueRouter from 'vue-router';
- import store from '@/store/index';
- Vue.use(VueRouter);
- const routes = [
- {
- path: '/home',
- component: () => import('../views/home/index.vue'),
- },
- // 修改密码
- {
- path: '/uppasswd/index',
- component: () => import('../views/uppasswd/index.vue'),
- },
- // 个人信息管理
- {
- path: '/userInfo/index',
- component: () => import('../views/userInfo/index.vue'),
- },
- // 金融数字超市-债权产品
- {
- path: '/supermarket/debt',
- component: () => import('../views/supermarket/debt.vue'),
- },
- {
- path: '/supermarket/debtdetail',
- component: () => import('../views/supermarket/debtdetail.vue'),
- },
- {
- path: '/supermarket/debtdetails',
- component: () => import('../views/supermarket/debtdetails.vue'),
- },
- {
- path: '/finance/index',
- component: () => import('../views/finance/index.vue'),
- },
- //新闻中心
- {
- path: '/news/index',
- component: () => import('../views/news/index.vue'),
- },
- //新闻中心详情
- {
- path: '/news/detail',
- component: () => import('../views/news/detail.vue'),
- },
- // 金融数字超市 - 股权产品
- {
- path: '/supermarket/stock',
- component: () => import('../views/supermarket/stock.vue'),
- },
- // 金融机构
- {
- path: '/institution/index/:status',
- component: () => import('../views/institution/index.vue'),
- },
- // 金融机构添加
- {
- path: '/institution/detail',
- component: () => import('../views/institution/detail.vue'),
- },
- // 其他用户管理-列表
- {
- path: '/otheruser/index',
- component: () => import('../views/otheruser/index.vue'),
- },
- // 其他用户管理-添加
- {
- path: '/otheruser/detail',
- component: () => import('../views/otheruser/detail.vue'),
- },
- // 企业用户管理-详情
- {
- path: '/companyuser/index',
- component: () => import('../views/companyuser/index.vue'),
- },
- {
- path: '/companyuser/detail',
- component: () => import('../views/companyuser/detail.vue'),
- },
- //指导单位
- {
- path: '/zhidao/index',
- component: () => import('../views/zhidao/index.vue'),
- },
- {
- path: '/zhidao/detail',
- component: () => import('../views/zhidao/detail.vue'),
- },
- //合作机构
- {
- path: '/tCooperativeOrganization/index',
- component: () => import('../views/tCooperativeOrganization/index.vue'),
- },
- {
- path: '/tCooperativeOrganization/detail',
- component: () => import('../views/tCooperativeOrganization/detail.vue'),
- },
- // 企业信息管理-列表
- {
- path: '/companyup/index',
- component: () => import('../views/companyup/index.vue'),
- },
- // 企业信息管理-详情
- {
- path: '/companyup/detail',
- component: () => import('../views/companyup/detail.vue'),
- },
- // 企业认证管理
- {
- path: '/companyidentify/index',
- component: () => import('../views/companyidentify/index.vue'),
- },
- // 企业认证管理-审核
- {
- path: '/companyidentify/detail',
- component: () => import('../views/companyidentify/detail.vue'),
- },
- // 角色管理-列表
- {
- path: '/character/index',
- component: () => import('../views/character/index.vue'),
- },
- // 角色管理-详情
- {
- path: '/character/detail',
- component: () => import('../views/character/detail.vue'),
- },
- // 地区管理-列表
- {
- path: '/region/index',
- component: () => import('../views/region/index.vue'),
- },
- // 地区管理-详情
- {
- path: '/region/detail',
- component: () => import('../views/region/detail.vue'),
- },
- //数字延伸服务管理
- {
- path: '/financialService/index',
- component: () => import('../views/financialService/index.vue'),
- },
- {
- path: '/financialService/detail',
- component: () => import('../views/financialService/detail.vue'),
- },
- {
- path: '/digitalService/index',
- component: () => import('../views/digitalService/index.vue'),
- },
- {
- path: '/digitalService/detail',
- component: () => import('../views/digitalService/detail.vue'),
- },
- {
- path: '/legalService/index',
- component: () => import('../views/legalService/index.vue'),
- },
- {
- path: '/legalService/detail',
- component: () => import('../views/legalService/detail.vue'),
- },
- {
- path: '/technicalService/index',
- component: () => import('../views/technicalService/index.vue'),
- },
- {
- path: '/technicalService/detail',
- component: () => import('../views/technicalService/detail.vue'),
- },
- {
- path: '/marketService/index',
- component: () => import('../views/marketService/index.vue'),
- },
- {
- path: '/marketService/detail',
- component: () => import('../views/marketService/detail.vue'),
- },
- {
- path: '/specialist/index',
- component: () => import('../views/specialist/index.vue'),
- },
- {
- path: '/specialist/detail',
- component: () => import('../views/specialist/detail.vue'),
- },
- //政策服务管理
- {
- path: '/tInformationDelivery/index',
- component: () => import('../views/tInformationDelivery/index.vue'),
- },
- {
- path: '/tInformationDelivery/detail',
- component: () => import('../views/tInformationDelivery/detail.vue'),
- },
- {
- path: '/tPolicyInterpretation/index',
- component: () => import('../views/tPolicyInterpretation/index.vue'),
- },
- {
- path: '/tPolicyInterpretation/detail',
- component: () => import('../views/tPolicyInterpretation/detail.vue'),
- },
- {
- path: '/tDeclarationApproval/index',
- component: () => import('../views/tDeclarationApproval/index.vue'),
- },
- {
- path: '/tDeclarationApproval/detail',
- component: () => import('../views/tDeclarationApproval/detail.vue'),
- },
- // 债权产品列表
- {
- path: '/financeclaims/financeClaimIndex',
- component: () => import('../views/financeclaims/financeClaimIndex.vue'),
- },
- // 债权产品信息详情
- {
- path: '/financeclaims/financeLookClaimDetail',
- component: () => import('../views/financeclaims/financeLookClaimDetail.vue'),
- },
- // 数贷产品列表
- {
- path: '/financeclaims/loanProIndex',
- component: () => import('../views/financeclaims/loanProIndex.vue'),
- },
- // 数贷产品信息修改(添加)
- {
- path: '/financeclaims/loanProDetail',
- component: () => import('../views/financeclaims/loanProDetail.vue'),
- },
- // 数贷产品信息详情
- {
- path: '/financeclaims/loanProLookDetail',
- component: () => import('../views/financeclaims/loanProLookDetail.vue'),
- },
- // 数贷产品授信页面
- {
- path: '/financeclaims/loanFollowndex',
- component: () => import('../views/financeclaims/loanFollowndex.vue'),
- },
- // 数贷产品授信详情页面
- {
- path: '/financeclaims/loanfollowDetail',
- component: () => import('../views/financeclaims/loanfollowDetail.vue'),
- },
- {
- path: '/login',
- name: 'login',
- component: () => import('../views/login.vue'),
- },
- // 理财产品列表
- {
- path: '/financeclaims/manageMoneyIndex',
- component: () => import('../views/financeclaims/manageMoneyIndex.vue'),
- },
- // 理财产品信息详情
- {
- path: '/financeclaims/manageMoneyLookDetail',
- component: () => import('../views/financeclaims/manageMoneyLookDetail.vue'),
- },
- // 首页轮播管理-列表
- {
- path: '/banner/index',
- component: () => import('../views/banner/index.vue'),
- },
- // 首页轮播管理-详情
- {
- path: '/banner/detail',
- component: () => import('../views/banner/detail.vue'),
- },
- ];
- const router = new VueRouter({
- mode: 'history',
- base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROOT_URL,
- routes,
- });
- router.beforeEach((to, form, next) => {
- store.commit('setUser');
- if (to.name === 'login') {
- next();
- return;
- }
- let user = store.state.user;
- if (user) {
- next();
- }
- //下面是没登录的情况,需要跳转页面到用户未登录页
- else next({ name: 'login' });
- });
- export default router;
|