<template>
	<div class="user">
		<div class="user-img" v-if="jsegs"><img :src="avatar?defaultSettings.urls + baseUrl+ avatar:require('./img/icon/avatar.jpg')"/></div>
    <div class="user-img" v-if="!jsegs"><img :src="avatar?avatar:require('./img/icon/avatar.jpg')"/></div>
	</div>
</template>


<script>
  const defaultSettings = require("@/settings.js");
	export default {
	  props:{
	  	avatar:{
	  		type:String,
	  		default:''
	  	}
	  },
	  data() {
	    return {
	      comment: '',
        baseUrl: process.env.VUE_APP_BASE_API,
        defaultSettings:defaultSettings,
        jsegs:false,
        avatar:avatar
	    }
	  },
    created() {
      if(this.avatar =='static/img/profile.473f5971.jpg'){
        this.jsegs = false
      }else{
        this.jsegs = true
      }
      console.log(this.jsegs,34)
    }

	}
</script>

<style type="text/css" scoped>
	.user{
		height: 50px;
		width: 50px;
	}
	.user-img img{
		height: 45px;
		width: 45px;
		border-radius:50%;
	}

</style>
