From cb16cabb64e99d7f505822a49665725ff5b61ff6 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 15 八月 2022 15:37:13 +0800
Subject: [PATCH] Merge branch 'wvp-28181-2.0'
---
web_src/src/components/Login.vue | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/web_src/src/components/Login.vue b/web_src/src/components/Login.vue
index 2b544bc..1dbd919 100644
--- a/web_src/src/components/Login.vue
+++ b/web_src/src/components/Login.vue
@@ -22,7 +22,7 @@
</div>
<div class="container-login100-form-btn">
- <div class="wrap-login100-form-btn">
+ <div class="wrap-login100-form-btn" :class="{'login-loading': isLoging}" v-loading="isLoging" element-loading-background="rgb(0 0 0 / 0%);" element-loading-custom-class="login-loading-class">
<div class="login100-form-bgbtn"></div>
<button class="login100-form-btn" @click="login">鐧诲綍</button>
</div>
@@ -35,12 +35,14 @@
<script>
import crypto from 'crypto'
+import Vue from 'vue'
export default {
name: 'Login',
data(){
return {
isLoging: false,
showPassword: false,
+ loginLoading: false,
username: '',
password: ''
}
@@ -83,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}) ;
+ 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