You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 2.9 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /*
  2. 作者: 魔仙堡
  3. 创建日期: 2023-9-03
  4. 版本: 1.0
  5. */
  6. import { createRouter, createWebHistory } from 'vue-router'
  7. import request from '@/request/request'
  8. const routes = [
  9. {
  10. path: '/login',
  11. name: '登陆',
  12. component: ()=>import('@/views/login/index'),
  13. },
  14. {
  15. path: '/',
  16. name: '仪表盘',
  17. component: ()=>import('@/views/index'),
  18. redirect: '/home',
  19. children:[
  20. {
  21. path: '/home',
  22. name: '首页',
  23. component: ()=>import('@/views/homeData/index'),
  24. }
  25. ]
  26. },
  27. {
  28. path: '/stockpredit',
  29. name: '股价预测',
  30. component: ()=>import('@/views/index'),
  31. },
  32. {
  33. path: '/factormining',
  34. name: '因子挖掘',
  35. component: ()=>import('@/views/index'),
  36. },
  37. {
  38. path: '/selectmodel',
  39. name: '模型选择',
  40. component: ()=>import('@/views/index'),
  41. },
  42. {
  43. path: '/mymodel',
  44. name: '我的模型',
  45. component: ()=>import('@/views/index'),
  46. },
  47. {
  48. path: '/sys',
  49. name: '权限设置',
  50. component: ()=>import('@/views/index'),
  51. children:[
  52. {
  53. path: '/auth',
  54. name: '权限管理',
  55. component: ()=>import('@/views/sys/auth/index'),
  56. },
  57. {
  58. path: '/role',
  59. name: '角色管理',
  60. component: ()=>import('@/views/sys/role/index'),
  61. },
  62. {
  63. path: '/mans',
  64. name: '人员管理',
  65. component: ()=>import('@/views/sys/mans/index'),
  66. }
  67. ],
  68. },
  69. {
  70. path: '/sett',
  71. name: '系统设置',
  72. component: ()=>import('@/views/index'),
  73. children:[
  74. {
  75. path: '/pwd',
  76. name: '修改密码',
  77. component: ()=>import('@/views/sys/updatePwd/index'),
  78. },
  79. {
  80. path: '/perPwd',
  81. name: '个人密码',
  82. component: ()=>import('@/views/sys/perPwd/index'),
  83. }
  84. ]
  85. }
  86. ]
  87. const router = createRouter({
  88. history: createWebHistory(process.env.BASE_URL),
  89. routes
  90. })
  91. router.beforeEach((to,from,next)=>{
  92. if(to.path!='/login'){ //需要登录
  93. let token = localStorage.getItem('token')
  94. let logindto = {}
  95. logindto.token=token
  96. logindto.urlpath=to.path
  97. if(token!=null){ //登录过
  98. //验证token
  99. request.post("/user/checkToken",token).then(res=>{
  100. //成功
  101. if(res.statusCode == '200'){
  102. // next()
  103. if(to.path=='/' || to.path=='/home'){
  104. next()
  105. }else {
  106. request.post("/user/checkURL",logindto).then(res=>{
  107. if(res.statusCode == '200'){
  108. next()
  109. }else{
  110. next({path:'/login'})
  111. }
  112. })
  113. }
  114. }else{
  115. next({path:'/login'})
  116. }
  117. }).catch(()=>{
  118. next({path:'/login'})
  119. })
  120. }else{ //没有登录
  121. next({path:'/login'})
  122. }
  123. }else{ //不需要登录
  124. next()
  125. }
  126. })
  127. export default router

基于MindSpore的多模态股票价格预测系统研究 Informer,LSTM,RNN