Merge branch 'master' of http://42.193.1.25:9521/r/dream_web
# Conflicts:
# src/views/login/index.vue
| | |
| | | }, |
| | | |
| | | { |
| | | path: "/logging", |
| | | component: () => import("@/views/logging/index"), |
| | | hidden: true, |
| | | }, |
| | | |
| | | { |
| | | path: "/404", |
| | | component: () => import("@/views/404"), |
| | | hidden: true, |
New file |
| | |
| | | <template> |
| | | <div> |
| | | 登录中…… |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { login } from "@/api/user"; |
| | | |
| | | export default { |
| | | mounted() { |
| | | let code = this.$route.query.code; |
| | | if (code) { |
| | | this.getUserDate(code); |
| | | } else { |
| | | this.getWeChatUrl(); |
| | | } |
| | | }, |
| | | methods: { |
| | | getUserDate(code) { |
| | | login({ |
| | | code: code, |
| | | }).then((res) => { |
| | | localStorage.setItem("user", JSON.stringify(res)); |
| | | this.$router.push("/student"); |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |