zhanghua
2024-09-12 8e87081e708acf1368c915cc12b963d135323eaf
Merge branch 'master' of http://42.193.1.25:9521/r/dream_web

# Conflicts:
# src/views/login/index.vue
1个文件已修改
1个文件已添加
38 ■■■■■ 已修改文件
src/router/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/logging/index.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js
@@ -38,6 +38,12 @@
  },
  {
    path: "/logging",
    component: () => import("@/views/logging/index"),
    hidden: true,
  },
  {
    path: "/404",
    component: () => import("@/views/404"),
    hidden: true,
src/views/logging/index.vue
New file
@@ -0,0 +1,32 @@
<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>