|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<el-card class="login-card">
|
|
<el-card class="login-card">
|
|
<div class="login-welcome">
|
|
<div class="login-welcome">
|
|
- <img :src="this.userImg" alt="welcome-img"
|
|
|
|
|
|
+ <img :src="this.userImg==null?defaultValue.image:this.userImg" alt="welcome-img"
|
|
class="pull-left welcome-img">
|
|
class="pull-left welcome-img">
|
|
<!-- <img v-else src="../../assets/img/logo-project.png" alt="welcome-img" class="pull-left welcome-img">-->
|
|
<!-- <img v-else src="../../assets/img/logo-project.png" alt="welcome-img" class="pull-left welcome-img">-->
|
|
<div style="margin-left: 46px">
|
|
<div style="margin-left: 46px">
|
|
@@ -27,7 +27,7 @@
|
|
<script>
|
|
<script>
|
|
import Http from '@/js/http.js'
|
|
import Http from '@/js/http.js'
|
|
import Apis from '@/js/api.js'
|
|
import Apis from '@/js/api.js'
|
|
- import {storageGet,logout} from '@/js/index.js'
|
|
|
|
|
|
+ import {storageGet,logout,defaultValue} from '@/js/index.js'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "LoginCard",
|
|
name: "LoginCard",
|
|
@@ -53,11 +53,16 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getUserImg() {
|
|
getUserImg() {
|
|
- Http.get(`/api/user/image/${this.user.userVO.id}`).then((res)=>{
|
|
|
|
- if(res.data){
|
|
|
|
- this.userImg = res.data;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.user == null) {
|
|
|
|
+ this.userImg = null
|
|
|
|
+ }else{
|
|
|
|
+ Http.get(`/api/user/image/${this.user.userVO.id}`).then((res)=>{
|
|
|
|
+ if(res.data){
|
|
|
|
+ this.userImg = res.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -69,7 +74,7 @@
|
|
|
|
|
|
<style scoped lang="less">
|
|
<style scoped lang="less">
|
|
.login-card {
|
|
.login-card {
|
|
- margin-bottom: 15px;
|
|
|
|
|
|
+ margin-bottom: 13px;
|
|
|
|
|
|
.welcome-img {
|
|
.welcome-img {
|
|
width: 40px;
|
|
width: 40px;
|
|
@@ -95,7 +100,7 @@
|
|
.welcome-btn {
|
|
.welcome-btn {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 28px;
|
|
height: 28px;
|
|
- margin-top: 25px;
|
|
|
|
|
|
+ margin-top: 20px;
|
|
|
|
|
|
.login-btn {
|
|
.login-btn {
|
|
background-color: rgba(0, 118, 203, 1);
|
|
background-color: rgba(0, 118, 203, 1);
|