|
@@ -0,0 +1,566 @@
|
|
|
+import Vue from 'vue';
|
|
|
+import VueRouter from 'vue-router';
|
|
|
+import store from '@/store/index';
|
|
|
+const jwt = require('jsonwebtoken');
|
|
|
+const originalPush = VueRouter.prototype.push;
|
|
|
+VueRouter.prototype.push = function push(location) {
|
|
|
+ return originalPush.call(this, location).catch((err) => err);
|
|
|
+};
|
|
|
+Vue.use(VueRouter);
|
|
|
+// 2021-07-07
|
|
|
+// 科创资讯
|
|
|
+const scientific = [
|
|
|
+ {
|
|
|
+ path: '/scientific/notice/index',
|
|
|
+ meta: { title: '科创资讯-通知通告' },
|
|
|
+ component: () => import('../views/scientific/notice/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/scientific/notice/detail',
|
|
|
+ meta: { title: '通知通告-详细信息' },
|
|
|
+ component: () => import('../views/scientific/notice/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/scientific/analysis/index',
|
|
|
+ meta: { title: '科创资讯-政策信息' },
|
|
|
+ component: () => import('../views/scientific/analysis/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/scientific/analysis/detail',
|
|
|
+ meta: { title: '政策信息-详细信息' },
|
|
|
+ component: () => import('../views/scientific/analysis/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/scientific/industry/index',
|
|
|
+ meta: { title: '科创资讯-吉药资讯' },
|
|
|
+ component: () => import('../views/scientific/industry/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/scientific/industry/detail',
|
|
|
+ meta: { title: '吉药资讯-详细信息' },
|
|
|
+ component: () => import('../views/scientific/industry/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/scientific/viewpoint/index',
|
|
|
+ meta: { title: '科创资讯-智库视点' },
|
|
|
+ component: () => import('../views/scientific/viewpoint/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/scientific/viewpoint/detail',
|
|
|
+ meta: { title: '智库视点-详细信息' },
|
|
|
+ component: () => import('../views/scientific/viewpoint/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/scientific/navigation/index',
|
|
|
+ meta: { title: '科创资讯-数据导航' },
|
|
|
+ component: () => import('../views/scientific/navigation/index.vue'),
|
|
|
+ },
|
|
|
+];
|
|
|
+// 服务在线
|
|
|
+const service = [
|
|
|
+ {
|
|
|
+ path: '/service/contract/index',
|
|
|
+ meta: { title: '服务在线-技术合同' },
|
|
|
+ component: () => import('../views/service/contract/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/achieve/index',
|
|
|
+ meta: { title: '服务在线-成果评价' },
|
|
|
+ component: () => import('../views/service/achieve/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/achieve/detail',
|
|
|
+ meta: { title: '成果评价-详细信息' },
|
|
|
+ component: () => import('../views/service/achieve/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/novelty/index',
|
|
|
+ meta: { title: '服务在线-查新服务' },
|
|
|
+ component: () => import('../views/service/novelty/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/index',
|
|
|
+ meta: { title: '服务在线-专利运营' },
|
|
|
+ component: () => import('../views/service/patent/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/continue/index',
|
|
|
+ meta: { title: '服务在线-高企咨询' },
|
|
|
+ component: () => import('../views/service/continue/index.vue'),
|
|
|
+ },
|
|
|
+];
|
|
|
+// 交流互动
|
|
|
+const exchange = [
|
|
|
+ {
|
|
|
+ path: '/exchange/project/index',
|
|
|
+ meta: { title: '交流互动-项目征集' },
|
|
|
+ component: () => import('../views/exchange/project/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/exchange/question/index',
|
|
|
+ meta: { title: '交流互动-调查问卷' },
|
|
|
+ component: () => import('../views/exchange/question/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/exchange/business/index',
|
|
|
+ meta: { title: '交流互动-咨询服务' },
|
|
|
+ component: () => import('../views/exchange/business/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/exchange/business/detail',
|
|
|
+ meta: { title: '咨询服务-详细信息' },
|
|
|
+ component: () => import('../views/exchange/business/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/exchange/center/index',
|
|
|
+ meta: { title: '个人中心' },
|
|
|
+ component: () => import('../views/exchange/center/index.vue'),
|
|
|
+ },
|
|
|
+ // 管理用户
|
|
|
+ {
|
|
|
+ path: '/exchange/center/adminCenter/mechanism/index',
|
|
|
+ meta: { title: '机构用户' },
|
|
|
+ component: () => import('../views/exchange/center/adminCenter/mechanism/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/exchange/center/adminCenter/mechanism/detail',
|
|
|
+ meta: { title: '机构用户-详细信息' },
|
|
|
+ component: () => import('../views/exchange/center/adminCenter/mechanism/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/exchange/center/adminCenter/users/index',
|
|
|
+ meta: { title: '平台用户' },
|
|
|
+ component: () => import('../views/exchange/center/adminCenter/users/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/exchange/center/adminCenter/users/detail',
|
|
|
+ meta: { title: '平台用户-详细信息' },
|
|
|
+ component: () => import('../views/exchange/center/adminCenter/users/detail.vue'),
|
|
|
+ },
|
|
|
+ // 机构用户
|
|
|
+ {
|
|
|
+ path: '/exchange/center/mechCenter/users/index',
|
|
|
+ meta: { title: '平台用户' },
|
|
|
+ component: () => import('../views/exchange/center/mechCenter/users/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/exchange/center/mechCenter/users/detail',
|
|
|
+ meta: { title: '平台用户-详细信息' },
|
|
|
+ component: () => import('../views/exchange/center/mechCenter/users/detail.vue'),
|
|
|
+ },
|
|
|
+ // 平台用户-专利信息
|
|
|
+ {
|
|
|
+ path: '/exchange/center/mechCenter/patent/index',
|
|
|
+ meta: { title: '专利信息' },
|
|
|
+ component: () => import('../views/exchange/center/mechCenter/patent/index.vue'),
|
|
|
+ },
|
|
|
+ // 个人(企业)用户
|
|
|
+ {
|
|
|
+ path: '/exchange/center/userCenter/basic/index',
|
|
|
+ meta: { title: '基本信息' },
|
|
|
+ component: () => import('../views/exchange/center/userCenter/basic/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/exchange/center/userCenter/password/index',
|
|
|
+ meta: { title: '修改密码' },
|
|
|
+ component: () => import('../views/exchange/center/userCenter/password/index.vue'),
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // path: '/exchange/center/user/index',
|
|
|
+ // meta: { title: '关联用户' },
|
|
|
+ // component: () => import('../views/exchange/center/user/index.vue'),
|
|
|
+ // },
|
|
|
+];
|
|
|
+//专利运营-2021-08-27
|
|
|
+const zlyy = [
|
|
|
+ // 管理员-我的消息
|
|
|
+ // 管理员-咨询服务
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/message/service',
|
|
|
+ meta: { title: '咨询服务' },
|
|
|
+ component: () => import('../views/service/patent/admin/message/service.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/message/service_detail',
|
|
|
+ meta: { title: '咨询服务-聊天详情' },
|
|
|
+ component: () => import('../views/service/patent/admin/message/service_detail.vue'),
|
|
|
+ },
|
|
|
+ // 管理员-通知信息
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/message/notice',
|
|
|
+ meta: { title: '通知信息' },
|
|
|
+ component: () => import('../views/service/patent/admin/message/notice.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/message/notice_create',
|
|
|
+ meta: { title: '通知信息-编辑通知' },
|
|
|
+ component: () => import('../views/service/patent/admin/message/notice_create.vue'),
|
|
|
+ },
|
|
|
+ // 管理员-审核通知
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/message/examine',
|
|
|
+ meta: { title: '审核通知' },
|
|
|
+ component: () => import('../views/service/patent/admin/message/examine.vue'),
|
|
|
+ },
|
|
|
+ // 管理员-专利预警
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/message/warning',
|
|
|
+ meta: { title: '专利预警' },
|
|
|
+ component: () => import('../views/service/patent/admin/message/warning.vue'),
|
|
|
+ },
|
|
|
+ // 管理员-专利审核
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/examine/patent',
|
|
|
+ meta: { title: '专利申请' },
|
|
|
+ component: () => import('../views/service/patent/admin/examine/patent.vue'),
|
|
|
+ },
|
|
|
+ // 国知局反馈消息
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/examine/hairmess',
|
|
|
+ meta: { title: '分发消息' },
|
|
|
+ component: () => import('../views/service/patent/admin/examine/hairmess.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/examine/hairmess_create',
|
|
|
+ meta: { title: '分发消息-添加消息' },
|
|
|
+ component: () => import('../views/service/patent/admin/examine/hairmess_create.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/examine/hairmess_autoCreate',
|
|
|
+ meta: { title: '分发消息-自动分发消息' },
|
|
|
+ component: () => import('../views/service/patent/admin/examine/hairmess_autoCreate.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/examine/analysis',
|
|
|
+ meta: { title: '查新检索' },
|
|
|
+ component: () => import('../views/service/patent/admin/examine/analysis.vue'),
|
|
|
+ },
|
|
|
+ // 管理员-专利申请管理
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/patent/info',
|
|
|
+ meta: { title: '专利信息' },
|
|
|
+ component: () => import('../views/service/patent/admin/patent/info.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/patent/info_create',
|
|
|
+ meta: { title: '专利信息-添加专利' },
|
|
|
+ component: () => import('../views/service/patent/admin/patent/info_create.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/patent/info_import',
|
|
|
+ meta: { title: '专利信息-导入专利' },
|
|
|
+ component: () => import('../views/service/patent/admin/patent/info_import.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/patent/info_result',
|
|
|
+ meta: { title: '专利信息-导出结果' },
|
|
|
+ component: () => import('../views/service/patent/admin/patent/info_result.vue'),
|
|
|
+ },
|
|
|
+ // 管理员-价值评估管理
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/patent/assessment',
|
|
|
+ meta: { title: '价值评估' },
|
|
|
+ component: () => import('../views/service/patent/admin/patent/assessment.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/patent/assessment_examine',
|
|
|
+ meta: { title: '价值评估-审核信息' },
|
|
|
+ component: () => import('../views/service/patent/admin/patent/assessment_examine.vue'),
|
|
|
+ },
|
|
|
+ // 管理员-专利交易管理
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/patent/trans',
|
|
|
+ meta: { title: '专利交易' },
|
|
|
+ component: () => import('../views/service/patent/admin/patent/trans.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/admin/patent/trans_info',
|
|
|
+ meta: { title: '专利交易-详细信息' },
|
|
|
+ component: () => import('../views/service/patent/admin/patent/trans_info.vue'),
|
|
|
+ },
|
|
|
+ // 机构用户
|
|
|
+ // 机构用户-我的消息
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/message/unRead',
|
|
|
+ meta: { title: '未读信息' },
|
|
|
+ component: () => import('../views/service/patent/mech/message/unRead.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/message/read',
|
|
|
+ meta: { title: '已读信息' },
|
|
|
+ component: () => import('../views/service/patent/mech/message/read.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/message/notice',
|
|
|
+ meta: { title: '通知信息' },
|
|
|
+ component: () => import('../views/service/patent/mech/message/notice.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/message/notice_create',
|
|
|
+ meta: { title: '通知信息-编辑通知' },
|
|
|
+ component: () => import('../views/service/patent/mech/message/notice_create.vue'),
|
|
|
+ },
|
|
|
+ // 机构用户-我的审核
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/examine/patent',
|
|
|
+ meta: { title: '专利审核' },
|
|
|
+ component: () => import('../views/service/patent/mech/examine/patent.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/examine/contract',
|
|
|
+ meta: { title: '合同审核' },
|
|
|
+ component: () => import('../views/service/patent/mech/examine/contract.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/examine/contract_check',
|
|
|
+ meta: { title: '合同审核-详细信息' },
|
|
|
+ component: () => import('../views/service/patent/mech/examine/contract_check.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/examine/trans',
|
|
|
+ meta: { title: '交易审核' },
|
|
|
+ component: () => import('../views/service/patent/mech/examine/trans.vue'),
|
|
|
+ },
|
|
|
+ // 机构用户-我的专利
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/patent/information',
|
|
|
+ meta: { title: '专利信息' },
|
|
|
+ component: () => import('../views/service/patent/mech/patent/information/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/patent/information/detail',
|
|
|
+ meta: { title: '专利信息-详细信息' },
|
|
|
+ component: () => import('../views/service/patent/mech/patent/information/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/patent/navigation',
|
|
|
+ meta: { title: '查新检索' },
|
|
|
+ component: () => import('../views/service/patent/mech/patent/navigation/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/patent/navigation/info',
|
|
|
+ meta: { title: '查新检索-详细信息' },
|
|
|
+ component: () => import('../views/service/patent/mech/patent/navigation/info.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/patent/early',
|
|
|
+ meta: { title: '专利预警' },
|
|
|
+ component: () => import('../views/service/patent/mech/patent/early/index.vue'),
|
|
|
+ },
|
|
|
+ // 机构用户-我的交易
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/transaction/index',
|
|
|
+ meta: { title: '专利交易' },
|
|
|
+ component: () => import('../views/service/patent/mech/transaction/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/mech/transaction/info',
|
|
|
+ meta: { title: '专利交易-详细信息' },
|
|
|
+ component: () => import('../views/service/patent/mech/transaction/info.vue'),
|
|
|
+ },
|
|
|
+ // 用户
|
|
|
+ // 用户-我的消息
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/message/unRead',
|
|
|
+ meta: { title: '未读信息查看' },
|
|
|
+ component: () => import('../views/service/patent/user/message/unRead.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/message/read',
|
|
|
+ meta: { title: '已读信息查看' },
|
|
|
+ component: () => import('../views/service/patent/user/message/read.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/message/notice',
|
|
|
+ meta: { title: '通知查看' },
|
|
|
+ component: () => import('../views/service/patent/user/message/notice.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/message/read_chat',
|
|
|
+ meta: { title: '聊天' },
|
|
|
+ component: () => import('../views/service/patent/user/message/read_chat.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/chat/index',
|
|
|
+ meta: { title: '咨詢服务' },
|
|
|
+ component: () => import('../views/service/patent/user/chat/index.vue'),
|
|
|
+ },
|
|
|
+ // 用户-我的申请
|
|
|
+ // 用户-专利申请
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/apply',
|
|
|
+ meta: { title: '专利申请' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/apply/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/apply/detail',
|
|
|
+ meta: { title: '专利申请-审批单' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/apply/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/apply/result',
|
|
|
+ meta: { title: '专利申请-审核结果' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/apply/result.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/apply/gzjDetail',
|
|
|
+ meta: { title: '专利申请-国知局信息' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/apply/gzjDetail.vue'),
|
|
|
+ },
|
|
|
+
|
|
|
+ // 用户-查新检索
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/analysis',
|
|
|
+ meta: { title: '查新检索' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/analysis/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/analysis/detail',
|
|
|
+ meta: { title: '查新检索-交底书' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/analysis/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/analysis/result',
|
|
|
+ meta: { title: '查新检索-审核结果' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/analysis/result.vue'),
|
|
|
+ },
|
|
|
+ // 用户-价值评估
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/assessment',
|
|
|
+ meta: { title: '价值评估' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/assessment/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/assessment/detail',
|
|
|
+ meta: { title: '价值评估-申请评估' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/assessment/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/apply/assessment/result',
|
|
|
+ meta: { title: '价值评估-审核结果' },
|
|
|
+ component: () => import('../views/service/patent/user/apply/assessment/result.vue'),
|
|
|
+ },
|
|
|
+ // 用户-我的专利
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/patent/information',
|
|
|
+ meta: { title: '专利信息' },
|
|
|
+ component: () => import('../views/service/patent/user/patent/information/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/patent/information/detail',
|
|
|
+ meta: { title: '专利信息-详细信息' },
|
|
|
+ component: () => import('../views/service/patent/user/patent/information/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/patent/information/trans_create',
|
|
|
+ meta: { title: '专利信息-发起交易' },
|
|
|
+ component: () => import('../views/service/patent/user/patent/information/trans_create.vue'),
|
|
|
+ },
|
|
|
+ // 用户-专利导航
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/patent/navigation',
|
|
|
+ meta: { title: '专利导航' },
|
|
|
+ component: () => import('../views/service/patent/user/patent/navigation/index.vue'),
|
|
|
+ },
|
|
|
+ // 用户-专利预警
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/patent/early',
|
|
|
+ meta: { title: '专利预警' },
|
|
|
+ component: () => import('../views/service/patent/user/patent/early/index.vue'),
|
|
|
+ },
|
|
|
+ // 用户-专利交易
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/transaction/index',
|
|
|
+ meta: { title: '专利交易' },
|
|
|
+ component: () => import('../views/service/patent/user/transaction/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/transaction/info',
|
|
|
+ meta: { title: '专利交易-详细信息' },
|
|
|
+ component: () => import('../views/service/patent/user/transaction/info.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/user/transaction/contract',
|
|
|
+ meta: { title: '专利交易-填写合同' },
|
|
|
+ component: () => import('../views/service/patent/user/transaction/contract.vue'),
|
|
|
+ },
|
|
|
+ // 公共专利
|
|
|
+ {
|
|
|
+ path: '/service/patent/market/index',
|
|
|
+ meta: { title: '专利超市' },
|
|
|
+ component: () => import('../views/service/patent/market/index.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/market/detail',
|
|
|
+ meta: { title: '专利超市-专利信息' },
|
|
|
+ component: () => import('../views/service/patent/market/detail.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/service/patent/market/transDetail',
|
|
|
+ meta: { title: '专利超市-交易信息' },
|
|
|
+ component: () => import('../views/service/patent/market/transDetail.vue'),
|
|
|
+ },
|
|
|
+];
|
|
|
+const web = [
|
|
|
+ {
|
|
|
+ path: '/',
|
|
|
+ name: 'index',
|
|
|
+ meta: { title: '网站首页' },
|
|
|
+ component: () => import('../views/index.vue'),
|
|
|
+ },
|
|
|
+ ...scientific,
|
|
|
+ ...service,
|
|
|
+ ...exchange,
|
|
|
+ ...zlyy,
|
|
|
+ {
|
|
|
+ path: '/login',
|
|
|
+ name: 'login',
|
|
|
+ meta: { title: '登录', key: 'login' },
|
|
|
+ component: () => import('../views/login.vue'),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/register',
|
|
|
+ name: 'register',
|
|
|
+ meta: { title: '账户注册', key: 'register' },
|
|
|
+ component: () => import('../views/register.vue'),
|
|
|
+ },
|
|
|
+];
|
|
|
+const routes = [...web];
|
|
|
+const router = new VueRouter({
|
|
|
+ mode: 'history',
|
|
|
+ base: process.env.VUE_APP_ROUTER,
|
|
|
+ routes,
|
|
|
+});
|
|
|
+router.beforeEach((to, from, next) => {
|
|
|
+ // let openid = 'oFqNO6VHEEwnMB_l1AD3pooBAkHk';
|
|
|
+ let openid = to.query.openid;
|
|
|
+ sessionStorage.setItem('openid', openid);
|
|
|
+ document.title = `${to.meta.title} `;
|
|
|
+ const token = localStorage.getItem('token');
|
|
|
+ // 不带参数
|
|
|
+ if (to.path == '/exchange/center/index') {
|
|
|
+ if (!token) {
|
|
|
+ next(`/login?path=${to.path}&&type=1`);
|
|
|
+ } else {
|
|
|
+ let user = jwt.decode(token);
|
|
|
+ store.commit('setUser', user, { root: true });
|
|
|
+ next();
|
|
|
+ }
|
|
|
+ // 带参数
|
|
|
+ // } else if (to.path == '/finance/apply') {
|
|
|
+ // if (!token) {
|
|
|
+ // next(`/login?path=${to.fullPath}`);
|
|
|
+ // } else {
|
|
|
+ // let user = jwt.decode(token);
|
|
|
+ // store.commit('setUser', user, { root: true });
|
|
|
+ // next();
|
|
|
+ // }
|
|
|
+ // // 已登录
|
|
|
+ } else {
|
|
|
+ let user = jwt.decode(token);
|
|
|
+ store.commit('setUser', user, { root: true });
|
|
|
+ next();
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
+export default router;
|