From 116d979d87f53f878a8c930cfad2c6a7cc831b19 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 09 八月 2022 16:58:31 +0800 Subject: [PATCH] 合并主线 --- web_src/src/components/Login.vue | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/web_src/src/components/Login.vue b/web_src/src/components/Login.vue index 4ade744..1dbd919 100644 --- a/web_src/src/components/Login.vue +++ b/web_src/src/components/Login.vue @@ -35,6 +35,7 @@ <script> import crypto from 'crypto' +import Vue from 'vue' export default { name: 'Login', data(){ @@ -84,11 +85,13 @@ url:"/api/user/login", params: loginParam }).then(function (res) { - console.log(JSON.stringify(res)); + console.log(res); + console.log(res.data.data); if (res.data.code == 0 && res.data.msg == "success") { that.$cookies.set("session", {"username": that.username,"roleId":res.data.data.role.id}) ; //鐧诲綍鎴愬姛鍚� that.cancelEnterkeyDefaultAction(); + Vue.prototype.$loginUser = res.data.data that.$router.push('/'); }else{ that.isLoging = false; -- Gitblit v1.8.0