|
@@ -3,7 +3,7 @@
|
|
|
<div class="login-welcome">
|
|
|
<img :src="this.userImg==null?defaultValue.image:this.userImg" 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">-->
|
|
|
+ <!-- <img v-else src="../../assets/img/logo-project.png" alt="welcome-img" class="pull-left welcome-img">-->
|
|
|
<div style="margin-left: 46px">
|
|
|
<div class="welcome-title">
|
|
|
hi,欢迎使用群智众测平台
|
|
@@ -27,7 +27,7 @@
|
|
|
<script>
|
|
|
import Http from '@/js/http.js'
|
|
|
import Apis from '@/js/api.js'
|
|
|
- import {storageGet,logout,defaultValue} from '@/js/index.js'
|
|
|
+ import {storageGet, logout, defaultValue} from '@/js/index.js'
|
|
|
|
|
|
export default {
|
|
|
name: "LoginCard",
|
|
@@ -36,7 +36,7 @@
|
|
|
isLogin: false,
|
|
|
user: {},
|
|
|
loginUrl: process.env.LOGIN_URL,
|
|
|
- userImg:require('../../assets/img/logo-project.png')
|
|
|
+ userImg: require('../../assets/img/logo-project.png')
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -53,11 +53,9 @@
|
|
|
})
|
|
|
},
|
|
|
getUserImg() {
|
|
|
- if (this.user == null) {
|
|
|
- this.userImg = null
|
|
|
- }else{
|
|
|
- Http.get(`/api/user/image/${this.user.userVO.id}`).then((res)=>{
|
|
|
- if(res.data){
|
|
|
+ if (this.user&&this.user.userVO&&this.user.userVO.id) {
|
|
|
+ Http.get(`/api/user/image/${this.user.userVO.id}`).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
this.userImg = res.data;
|
|
|
}
|
|
|
})
|