From c819024e241b9f7c54cc3786373ad0d2998f2190 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Fri, 05 May 2023 08:55:46 +0800
Subject: [PATCH] 修改
---
src/views/login/index.vue | 62 ++++++++++++++++++++++--------
1 files changed, 45 insertions(+), 17 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 3effba1..4473cbd 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -1,10 +1,10 @@
<template>
<div class="login-container">
<div class="title-one">
- <span>拜城县众泰煤焦化有限公司</span>
+ 欢迎访问
</div>
<div class="title-two">
- <span>智能化安全管理技术平台</span>
+ 隐患排查体系综合管控系统
</div>
<div class="login-main">
<div class="login-main-pic"></div>
@@ -15,7 +15,7 @@
</div>
</div>
<div class="bottom-container">
- <span style="text-align: center">Copyright©2022 新疆阿克苏拜城众泰煤焦化有限公司 版权所有</span>
+ Copyright©2023 苏州国科鸿宇智能科技有限公司 版权所有
</div>
<!-- <el-row>-->
<!-- <el-col :xs="24" :sm="24" :lg="12">-->
@@ -35,7 +35,7 @@
</template>
<script>
- import { loginByUsername } from '@/api/login'
+ import { getAccount,loginByUsername,getUserInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import Cookies from 'js-cookie'
import { initRouter } from '@/utils/router'
@@ -138,6 +138,26 @@
Cookies.set('token_expired_at', data.tokenexpired)
_this.$store.commit('SET_NAME', data.realname)
_this.$store.commit('SET_USER_TYPE', data.type)
+ //换取账号密码
+ getUserInfo().then(res => {
+ if (res.data.code == 200) {
+ loginForm.department = res.data.result.department
+ // loginForm.department = "公司领导"
+ getAccount(loginForm).then(res => {
+ if (res.data.code == 200) {
+ //缓存账号密码
+ Cookies.set("hiddenDangerUsername",res.data.result.username)
+ Cookies.set("hiddenDangerPassword",res.data.result.password)
+ } else {
+ this.$message({type: 'error', message: res.data.msg, duration: 3000})
+ }
+ })
+
+ } else {
+ this.$message({type: 'error', message: "用户信息获取失败!请重试", duration: 3000})
+ }
+ })
+
// 加载菜单
initRouter(_this)
_this.$router.replace('/')
@@ -174,7 +194,7 @@
.login-container {
min-height: 100%;
width: 100%;
- background: url("../../assets/bg.jpg") center no-repeat;
+ background: url("../../assets/bg_login.png") center no-repeat;
//background-size: auto 100%;
// background-color: #2d3a4b;
overflow: hidden;
@@ -182,40 +202,47 @@
.title-one{
width: 360px;
height: 42px;
- font-size: 30px;
+ font-size: 36px;
+ text-align: center;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
- color: #FFFFFF;
+ color: #1851DC;
line-height: 42px;
text-shadow: 0px 8px 10px rgba(16, 57, 193, 0.3);
margin: 0 auto;
- margin-top: 120px;
+ margin-top: 160px;
}
.title-two{
- width: 473px;
+ width: 80%;
height: 61px;
- font-size: 43px;
+ font-size: 48px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
- color: #FFFFFF;
+ color: #1851DC;
+ text-align: center;
line-height: 61px;
+ letter-spacing: 10px;
+ text-indent: 10px;
text-shadow: 0px 8px 10px rgba(16, 57, 193, 0.3);
margin: 0 auto;
- margin-top: 5px;
+ margin-top: 20px;
}
.login-main{
display: flex;
background: linear-gradient(270deg, #FFFFFF 0%, #FFFFFF 100%);
- box-shadow: 0px 20px 40px 0px rgba(34, 0, 255, 0.7);
+ box-shadow: 0px 20px 40px 0px rgba(1, 140, 255, 0.7);
width:1036px;
- min-height: 474px;
+ min-height: 476px;
margin:0 auto;
margin-top: 60px;
+ border-radius: 8px;
+ overflow: hidden;
.login-main-pic{
display: inline-block;
- height: 474px;
+ height: 476px;
width: 572px;
- background: url("../../assets/img_bg_login.png") center no-repeat;
+ background: url("../../assets/bg.jpg") center no-repeat;
+ background-size: 100% auto;
}
.login-main-form{
display: inline-block;
@@ -224,13 +251,14 @@
}
}
.bottom-container{
- width:600px;
+ width: 600px;
height: 42px;
font-family: PingFangSC-Semibold, PingFang SC;
line-height: 42px;
text-shadow: 0px 8px 10px rgba(16, 57, 193, 0.3);
margin: 0 auto;
margin-top: 150px;
+ text-align: center;
}
}
--
Gitblit v1.9.2