index.js 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. import Vue from 'vue';
  2. import VueRouter from 'vue-router';
  3. import checkLogin from './before';
  4. Vue.use(VueRouter);
  5. const live = [
  6. {
  7. path: '/live',
  8. name: 'live_detail',
  9. component: () => import('../views/live/index.vue'),
  10. children: [
  11. {
  12. path: '/live/detail',
  13. meta: { title: '信息详情', subSite: true },
  14. name: 'live_detail',
  15. component: () => import('../views/live/detail/detail.vue'),
  16. },
  17. {
  18. path: '/live/dynamic',
  19. meta: { title: '动态监控', subSite: true },
  20. name: 'live_dynamic',
  21. component: () => import('../views/live/dynamic/index.vue'),
  22. },
  23. {
  24. path: '/live/list',
  25. meta: { title: '新闻列表', subSite: true },
  26. name: 'live_list',
  27. component: () => import('../views/live/news-list/index.vue'),
  28. },
  29. {
  30. path: '/live/img/list',
  31. meta: { title: '图片列表', subSite: true },
  32. name: 'live_img_list',
  33. component: () => import('../views/live/news-list/img-list.vue'),
  34. },
  35. {
  36. path: '/live/service',
  37. meta: { title: '创新服务', subSite: true },
  38. name: 'live_service',
  39. component: () => import('../views/live/service/index.vue'),
  40. },
  41. {
  42. path: '/live/market',
  43. meta: { title: '科技超市', subSite: true },
  44. name: 'live_market',
  45. component: () => import('../views/live/market/index.vue'),
  46. },
  47. {
  48. path: '/live/technical',
  49. meta: { title: '科技超市', subSite: true },
  50. name: 'live_technical',
  51. component: () => import('../views/live/technical/index.vue'),
  52. },
  53. {
  54. path: '/live/liveApply',
  55. meta: { title: '项目申请', subSite: true },
  56. name: 'live_apply',
  57. component: () => import('../views/live/hall/liveApply.vue'),
  58. },
  59. ],
  60. },
  61. {
  62. path: '/live/hall/index',
  63. meta: { title: '直播首页', subSite: true },
  64. name: 'live_hall_index',
  65. component: () => import('../views/live/hall/index.vue'),
  66. },
  67. {
  68. path: '/live/hall',
  69. meta: { title: '直播大厅', subSite: true },
  70. name: 'live_hall',
  71. component: () => import('../views/live/hall/hall.vue'),
  72. },
  73. {
  74. path: '/live/liveList',
  75. meta: { title: '直播中心', subSite: true },
  76. name: 'live_list',
  77. component: () => import('../views/live/hall/liveList.vue'),
  78. },
  79. {
  80. path: '/live/home',
  81. meta: { title: '直播首页', subSite: true },
  82. name: 'live_home',
  83. component: () => import('../views/live/home.vue'),
  84. },
  85. ];
  86. const routes = [
  87. {
  88. path: '/',
  89. name: 'index',
  90. component: () => import('../views/index.vue'),
  91. },
  92. // 科技政务
  93. {
  94. path: '/government/government',
  95. name: 'government',
  96. component: () => import('../views/government/government.vue'),
  97. },
  98. // 科技政务-列表
  99. {
  100. path: '/government/governmentList',
  101. name: 'governmentList',
  102. component: () => import('../views/government/governmentList.vue'),
  103. },
  104. // 科技政务-详情
  105. {
  106. path: '/government/governmentDetail',
  107. name: 'governmentDetail',
  108. component: () => import('../views/government/governmentDetail.vue'),
  109. },
  110. // 科技政策
  111. {
  112. path: '/policy/policy',
  113. name: 'policy',
  114. component: () => import('../views/policy/policy.vue'),
  115. },
  116. // 首页政策法规详情(所属科技政策,综合政策指导)
  117. {
  118. path: '/policy/lawDetail',
  119. name: 'lawDetail',
  120. component: () => import('../views/policy/lawDetail.vue'),
  121. },
  122. // 科技超市
  123. {
  124. path: '/supermaket/supermarket',
  125. name: 'supermarket',
  126. component: () => import('../views/supermaket/supermarket.vue'),
  127. },
  128. // 科技超市产品列表
  129. {
  130. path: '/supermaket/supermarketlist',
  131. name: 'supermarketlist',
  132. component: () => import('../views/supermaket/supermarketlist.vue'),
  133. },
  134. // 科技超市-高校院所
  135. {
  136. path: '/supermaket/supermarketColleges',
  137. name: 'supermarketColleges',
  138. component: () => import('../views/supermaket/supermarketColleges.vue'),
  139. },
  140. // 科技超市-科研院所
  141. {
  142. path: '/supermaket/supermarketScientific',
  143. name: 'supermarketSientific',
  144. component: () => import('../views/supermaket/supermarketScientific.vue'),
  145. },
  146. // 科技超市-科技企业
  147. {
  148. path: '/supermaket/supermarketEnterprise',
  149. name: 'supermarketEnterprise',
  150. component: () => import('../views/supermaket/supermarketEnterprise.vue'),
  151. },
  152. // 科技超市-机构团体
  153. {
  154. path: '/supermaket/supermarketGroup',
  155. name: 'supermarketGroup',
  156. component: () => import('../views/supermaket/supermarketGroup.vue'),
  157. },
  158. // 科技超市-研发服务
  159. {
  160. path: '/supermaket/supermaketService',
  161. name: 'supermaketService',
  162. component: () => import('../views/supermaket/supermaketService.vue'),
  163. },
  164. //科技超市-技术成果
  165. {
  166. path: '/supermaket/supermakettechnology',
  167. name: 'supermakettechnology',
  168. component: () => import('../views/supermaket/supermakettechnology.vue'),
  169. },
  170. // 科技超市-创新产品
  171. {
  172. path: '/supermaket/supermarketProduct',
  173. name: 'supermarketProduct',
  174. component: () => import('../views/supermaket/supermarketProduct.vue'),
  175. },
  176. // 科技超市-咨询服务
  177. {
  178. path: '/supermaket/supermarketinnovate',
  179. name: 'supermarketinnovate',
  180. component: () => import('../views/supermaket/supermarketinnovate.vue'),
  181. },
  182. //科技数据
  183. {
  184. path: '/shuju/shuju',
  185. name: 'shuju',
  186. component: () => import('../views/shuju/shuju.vue'),
  187. },
  188. {
  189. path: '/shuju/shujulist',
  190. name: 'shujulist',
  191. component: () => import('../views/shuju/shujulist.vue'),
  192. },
  193. {
  194. path: '/shuju/shujudetail',
  195. name: 'shujudetail',
  196. component: () => import('../views/shuju/shujudetail.vue'),
  197. },
  198. //科技服务
  199. {
  200. path: '/service/service',
  201. name: 'service',
  202. component: () => import('../views/service/service.vue'),
  203. },
  204. {
  205. path: '/service/servicelist',
  206. name: 'servicelist',
  207. component: () => import('../views/service/servicelist.vue'),
  208. },
  209. {
  210. path: '/service/servicedetail',
  211. name: ' servicedetail',
  212. component: () => import('../views/service/servicedetail.vue'),
  213. },
  214. // 科技资源
  215. {
  216. path: '/resource/resource',
  217. name: 'service',
  218. component: () => import('../views/resource/resource.vue'),
  219. },
  220. //登录和注册
  221. {
  222. path: '/login',
  223. meta: { title: '用户' },
  224. component: () => import('../views/login.vue'),
  225. },
  226. //科技人才
  227. {
  228. path: '/personnel/personnel',
  229. name: 'personnel',
  230. component: () => import('../views/personnel/personnel.vue'),
  231. },
  232. //科技人才投简历详情
  233. {
  234. path: '/personnel/rencai',
  235. component: () => import('../views/personnel/rencai.vue'),
  236. },
  237. //科技人才找工作详情
  238. {
  239. path: '/personnel/personnelwork',
  240. name: 'personnelwork',
  241. component: () => import('../views/personnel/personnelwork.vue'),
  242. },
  243. //科技人才找专家详情
  244. {
  245. path: '/personnel/personnelexpert',
  246. component: () => import('../views/personnel/personnelexpert.vue'),
  247. },
  248. // 科技人才找参谋详情
  249. {
  250. path: '/personnel/personnelcmdetail',
  251. component: () => import('../views/personnel/personnelcmdetail.vue'),
  252. },
  253. // 科技人才找招聘信息
  254. {
  255. path: '/personnel/recruitList',
  256. component: () => import('../views/personnel/recruitList.vue'),
  257. },
  258. // 科技人才-就业指导
  259. {
  260. path: '/personnel/guidanceList',
  261. component: () => import('../views/personnel/guidanceList.vue'),
  262. },
  263. // 科技人才-学习实践
  264. {
  265. path: '/personnel/practiceList',
  266. component: () => import('../views/personnel/practiceList.vue'),
  267. },
  268. // 科技人才-勤工俭学
  269. {
  270. path: '/personnel/diligenceList',
  271. component: () => import('../views/personnel/diligenceList.vue'),
  272. },
  273. // 科技人才-工作顾问
  274. {
  275. path: '/personnel/adviserList',
  276. component: () => import('../views/personnel/adviserList.vue'),
  277. },
  278. //企业-基本信息
  279. {
  280. path: '/enterprise/enterprisejb',
  281. name: 'enterprisefabu',
  282. component: () => import('../views/enterprise/enterprisejb.vue'),
  283. },
  284. //企业-信息管理
  285. {
  286. path: '/enterprise/enterprisexx',
  287. name: 'enterprisexuqiu',
  288. component: () => import('../views/enterprise/enterprisexx.vue'),
  289. },
  290. //企业-发布信息列表
  291. {
  292. path: '/enterprise/enterprisefabu',
  293. name: 'enterprisefabu',
  294. component: () => import('../views/enterprise/enterprisefabu.vue'),
  295. },
  296. // 企业-需求发布
  297. {
  298. path: '/enterprise/enterprisexuqiu',
  299. name: 'enterprisexuqiu',
  300. component: () => import('../views/enterprise/enterprisexuqiu.vue'),
  301. },
  302. //企业-订购
  303. {
  304. path: '/enterprise/enterprisedg',
  305. name: 'enterprisedg',
  306. component: () => import('../views/enterprise/enterprisedg.vue'),
  307. },
  308. // 外审管理员
  309. {
  310. path: '/trial/index',
  311. name: 'trial',
  312. component: () => import('../views/trial/index.vue'),
  313. },
  314. ...live,
  315. ];
  316. const router = new VueRouter({
  317. mode: 'history',
  318. base: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROUTER,
  319. routes,
  320. });
  321. checkLogin(router);
  322. export default router;