style:登录修改
Showing
2 changed files
with
14 additions
and
25 deletions
| ... | @@ -17,10 +17,10 @@ | ... | @@ -17,10 +17,10 @@ |
| 17 | </div> | 17 | </div> |
| 18 | </template> | 18 | </template> |
| 19 | <script> | 19 | <script> |
| 20 | import { mapGetters } from 'vuex' | 20 | import { mapGetters } from 'vuex' |
| 21 | import Breadcrumb from './Breadcrumb' | 21 | import Breadcrumb from './Breadcrumb' |
| 22 | import { logout } from "@/api/login.js"; | 22 | import { logout } from "@/api/login.js"; |
| 23 | export default { | 23 | export default { |
| 24 | components: { | 24 | components: { |
| 25 | Breadcrumb | 25 | Breadcrumb |
| 26 | }, | 26 | }, |
| ... | @@ -45,7 +45,7 @@ export default { | ... | @@ -45,7 +45,7 @@ export default { |
| 45 | this.$store.dispatch("user/resetState"); | 45 | this.$store.dispatch("user/resetState"); |
| 46 | this.$store.dispatch("permission/resetRoutes"); | 46 | this.$store.dispatch("permission/resetRoutes"); |
| 47 | this.$router.replace({ | 47 | this.$router.replace({ |
| 48 | path: "/sb" | 48 | path: "/login" |
| 49 | }) | 49 | }) |
| 50 | }) | 50 | }) |
| 51 | .catch((error) => { | 51 | .catch((error) => { |
| ... | @@ -53,12 +53,12 @@ export default { | ... | @@ -53,12 +53,12 @@ export default { |
| 53 | }) | 53 | }) |
| 54 | } | 54 | } |
| 55 | } | 55 | } |
| 56 | } | 56 | } |
| 57 | </script> | 57 | </script> |
| 58 | <style lang="scss" scoped> | 58 | <style lang="scss" scoped> |
| 59 | @import "~@/styles/_handle.scss"; | 59 | @import "~@/styles/_handle.scss"; |
| 60 | 60 | ||
| 61 | .navbar-con { | 61 | .navbar-con { |
| 62 | position: relative; | 62 | position: relative; |
| 63 | 63 | ||
| 64 | .logo { | 64 | .logo { |
| ... | @@ -79,9 +79,9 @@ export default { | ... | @@ -79,9 +79,9 @@ export default { |
| 79 | line-height: 50px; | 79 | line-height: 50px; |
| 80 | } | 80 | } |
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | .navbar { | 84 | .navbar { |
| 85 | height: $headerHeight; | 85 | height: $headerHeight; |
| 86 | overflow: hidden; | 86 | overflow: hidden; |
| 87 | position: relative; | 87 | position: relative; |
| ... | @@ -104,5 +104,5 @@ export default { | ... | @@ -104,5 +104,5 @@ export default { |
| 104 | align-items: center; | 104 | align-items: center; |
| 105 | } | 105 | } |
| 106 | } | 106 | } |
| 107 | } | 107 | } |
| 108 | </style> | 108 | </style> | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器 | 2 | * @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器 |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-04-27 17:09:51 | 4 | * @LastEditTime: 2023-05-25 14:52:20 |
| 5 | */ | 5 | */ |
| 6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
| 7 | import axios from "axios"; | 7 | import axios from "axios"; |
| ... | @@ -69,23 +69,12 @@ function handleErrorData (status) { | ... | @@ -69,23 +69,12 @@ function handleErrorData (status) { |
| 69 | window.tokenValid = false; | 69 | window.tokenValid = false; |
| 70 | Message.error("由于长时间未操作,请重新登录!"); | 70 | Message.error("由于长时间未操作,请重新登录!"); |
| 71 | localStorage.removeItem("token"); | 71 | localStorage.removeItem("token"); |
| 72 | let code = Vue.prototype.BASE_API.CODE | ||
| 73 | if (code == 'BDCSBPT') { | ||
| 74 | router.replace({ | 72 | router.replace({ |
| 75 | path: "/sb", | 73 | path: "/login", |
| 76 | query: { | 74 | query: { |
| 77 | redirect: router.history.current.fullPath, | 75 | redirect: router.history.current.fullPath, |
| 78 | }, | ||
| 79 | }); | ||
| 80 | } else { | ||
| 81 | router.replace({ | ||
| 82 | path: "/jg", | ||
| 83 | query: { | ||
| 84 | redirect: router.history.current.fullPath, | ||
| 85 | }, | ||
| 86 | }); | ||
| 87 | } | 76 | } |
| 88 | 77 | }) | |
| 89 | } | 78 | } |
| 90 | break; | 79 | break; |
| 91 | case 404: | 80 | case 404: | ... | ... |
-
Please register or sign in to post a comment