From 8e87081e708acf1368c915cc12b963d135323eaf Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期四, 12 九月 2024 16:59:07 +0800 Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/dream_web --- src/router/index.js | 6 ++++++ src/views/logging/index.vue | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index b259f99..e3eb2c5 100644 --- a/src/router/index.js +++ b/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, diff --git a/src/views/logging/index.vue b/src/views/logging/index.vue new file mode 100644 index 0000000..5763f57 --- /dev/null +++ b/src/views/logging/index.vue @@ -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> \ No newline at end of file -- Gitblit v1.8.0