index.js 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. import Vue from 'vue';
  2. import VueRouter from 'vue-router';
  3. import checkLogin from '@common/router/before';
  4. Vue.use(VueRouter);
  5. const routes = [
  6. {
  7. path: '/',
  8. name: 'home',
  9. component: () => import('../views/home/index.vue'),
  10. },
  11. // 科技政务
  12. {
  13. path: '/government/index',
  14. component: () => import('../views/government/index.vue'),
  15. },
  16. // 科技政务-栏目列表
  17. {
  18. path: '/government/columnDetail',
  19. component: () => import('../views/government/columnDetail.vue'),
  20. },
  21. // 科技政务-信息列表
  22. {
  23. path: '/government/messageInfoDetail',
  24. component: () => import('../views/government/messageInfoDetail.vue'),
  25. },
  26. // 科技政策
  27. {
  28. path: '/policy/index',
  29. component: () => import('../views/policy/index.vue'),
  30. },
  31. // 科技政策-栏目列表
  32. {
  33. path: '/policy/columnDetail',
  34. component: () => import('../views/policy/columnDetail.vue'),
  35. },
  36. // 科技政策-信息列表
  37. {
  38. path: '/policy/messageInfoDetail',
  39. component: () => import('../views/policy/messageInfoDetail.vue'),
  40. },
  41. // 科技数据
  42. {
  43. path: '/record/index',
  44. component: () => import('../views/record/index.vue'),
  45. },
  46. // 科技数据-栏目列表
  47. {
  48. path: '/record/columnDetail',
  49. component: () => import('../views/record/columnDetail.vue'),
  50. },
  51. // 科技数据-信息列表
  52. {
  53. path: '/record/messageInfoDetail',
  54. component: () => import('../views/record/messageInfoDetail.vue'),
  55. },
  56. // 科技服务
  57. {
  58. path: '/serve/index',
  59. component: () => import('../views/serve/index.vue'),
  60. },
  61. // 科技服务-栏目列表
  62. {
  63. path: '/serve/columnDetail',
  64. component: () => import('../views/serve/columnDetail.vue'),
  65. },
  66. // 科技服务-信息列表
  67. {
  68. path: '/serve/messageInfoDetail',
  69. component: () => import('../views/serve/messageInfoDetail.vue'),
  70. },
  71. // 科技资源
  72. {
  73. path: '/resource/index',
  74. component: () => import('../views/resource/index.vue'),
  75. },
  76. // 科技人才-栏目管理
  77. {
  78. path: '/personnel/column',
  79. component: () => import('../views/personnel/column.vue'),
  80. },
  81. // 科技人才-添加栏目
  82. {
  83. path: '/personnel/columnDetail',
  84. component: () => import('../views/personnel/columnDetail.vue'),
  85. },
  86. // 科技人才-招聘信息管理
  87. {
  88. path: '/personnel/recruit',
  89. component: () => import('../views/personnel/recruit.vue'),
  90. },
  91. // 科技人才-添加招聘信息
  92. {
  93. path: '/personnel/recruitDetail',
  94. component: () => import('../views/personnel/recruitDetail.vue'),
  95. },
  96. // 科技人才-人才信息管理
  97. {
  98. path: '/personnel/resume',
  99. component: () => import('../views/personnel/resume.vue'),
  100. },
  101. // 科技人才-添加人才
  102. {
  103. path: '/personnel/resumeDetail',
  104. component: () => import('../views/personnel/resumeDetail.vue'),
  105. },
  106. // 科技人才-专家信息管理
  107. {
  108. path: '/personnel/experts',
  109. component: () => import('../views/personnel/experts.vue'),
  110. },
  111. // 科技人才-添加专家
  112. {
  113. path: '/personnel/expertsDetail',
  114. component: () => import('../views/personnel/expertsDetail.vue'),
  115. },
  116. // 科技人才-基本信息管理
  117. {
  118. path: '/personnel/informate',
  119. component: () => import('../views/personnel/informate.vue'),
  120. },
  121. // 科技人才-添加基本信息
  122. {
  123. path: '/personnel/informateDetail',
  124. component: () => import('../views/personnel/informateDetail.vue'),
  125. },
  126. //科技超市企业状态审核管理
  127. {
  128. path: '/enterprise/index',
  129. component: () => import('../views/enterprise/index.vue'),
  130. },
  131. //科技超市交易审核管理
  132. {
  133. path: '/enterprise/transaction',
  134. component: () => import('../views/enterprise/transaction.vue'),
  135. },
  136. //科技超市发起交易审核详情
  137. {
  138. path: '/enterprise/detail',
  139. component: () => import('../views/enterprise/detail.vue'),
  140. },
  141. //科技超市交易审核管理
  142. {
  143. path: '/enterprise/jiaoyidetail',
  144. component: () => import('../views/enterprise/jiaoyidetail.vue'),
  145. },
  146. // 站点信息
  147. {
  148. path: '/site/index',
  149. meta: { title: '网站设置' },
  150. component: () => import('../views/site/index.vue'),
  151. },
  152. // 用户管理
  153. {
  154. path: '/user/index',
  155. meta: { title: '用户设置' },
  156. component: () => import('../views/user/index.vue'),
  157. },
  158. {
  159. path: '/user/detail',
  160. meta: { title: '添加用户' },
  161. component: () => import('../views/user/detail.vue'),
  162. },
  163. // 友情链接管理
  164. {
  165. path: '/links/index',
  166. meta: { title: '友情链接' },
  167. component: () => import('../views/links/index.vue'),
  168. },
  169. {
  170. path: '/links/detail',
  171. meta: { title: '友情链接' },
  172. component: () => import('../views/links/detail.vue'),
  173. },
  174. // 产品类型字典表
  175. {
  176. path: '/supermaket/chanpinType',
  177. component: () => import('../views/supermaket/chanpinType.vue'),
  178. },
  179. // 添加产品类型字典表
  180. {
  181. path: '/supermaket/chanpinTypeDetail',
  182. component: () => import('../views/supermaket/chanpinTypeDetail.vue'),
  183. },
  184. {
  185. path: '/dictionary',
  186. meta: { title: '字典管理' },
  187. component: () => import('../views/dictionary/index.vue'),
  188. },
  189. {
  190. path: '/present',
  191. meta: { title: '礼物管理' },
  192. component: () => import('../views/present/index.vue'),
  193. },
  194. //对接会
  195. //对接会列表
  196. {
  197. path: '/duijiehui/index',
  198. component: () => import('../views/duijiehui/index.vue'),
  199. },
  200. //对接会详情
  201. {
  202. path: '/duijiehui/detail',
  203. component: () => import('../views/duijiehui/detail.vue'),
  204. },
  205. //对接会审核
  206. {
  207. path: '/duijiehui/duijieshenhe',
  208. component: () => import('../views/duijiehui/duijieshenhe.vue'),
  209. },
  210. //对接会管理员审核详情
  211. {
  212. path: '/duijiehui/duijiehuiexamine',
  213. component: () => import('../views/duijiehui/duijiehuiexamine.vue'),
  214. },
  215. //对接会是否开始
  216. {
  217. path: '/duijiehui/duijiehuistatus',
  218. component: () => import('../views/duijiehui/duijiehuistatus.vue'),
  219. },
  220. //权限管理
  221. //权限管理-权限列表
  222. {
  223. path: '/permission/index',
  224. component: () => import('../views/permission/index.vue'),
  225. },
  226. //权限管理-分配权限
  227. {
  228. path: '/permission/detail',
  229. component: () => import('../views/permission/detail.vue'),
  230. },
  231. //模块
  232. {
  233. path: '/lanmu/detali',
  234. component: () => import('../views/lanmu/detali.vue'),
  235. },
  236. {
  237. path: '/menu',
  238. meta: { title: '菜单管理' },
  239. component: () => import('../views/menu/index.vue'),
  240. },
  241. {
  242. path: '/adminUser',
  243. meta: { title: '子管理员管理' },
  244. component: () => import('../views/admin-user/index.vue'),
  245. },
  246. // vip用户
  247. {
  248. path: '/vip/index',
  249. meta: { title: 'vip管理' },
  250. component: () => import('../views/vip-user/index.vue'),
  251. },
  252. // 5-12新增
  253. // 技术培训
  254. {
  255. path: '/technical/index',
  256. component: () => import('../views/technical/index.vue'),
  257. },
  258. // 技术培训-栏目列表
  259. {
  260. path: '/technical/columnDetail',
  261. component: () => import('../views/technical/columnDetail.vue'),
  262. },
  263. // 技术培训-信息列表
  264. {
  265. path: '/technical/messageInfoDetail',
  266. component: () => import('../views/technical/messageInfoDetail.vue'),
  267. },
  268. ];
  269. const router = new VueRouter({
  270. mode: 'history',
  271. base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
  272. routes,
  273. });
  274. checkLogin(router, () => {
  275. let url = process.env.NODE_ENV === 'development' ? null : `/platlive/login`;
  276. if (url) window.location.href = url;
  277. else console.log('开发环境自己弄');
  278. });
  279. export default router;