Commit 5750b4b8 authored by yyh's avatar yyh

用户默认头像

parent 01908bdd
<template>
<div class="user-index">
<header>
<van-image width="55" round height="55" :src="userInfo.icon" class="left"></van-image>
<van-image width="55" round height="55" :src="userIcon" class="left"></van-image>
<div>
<div v-if="isLogin">{{userInfo.user}}</div>
<div v-else style="color:#353535;font-size: 20px;font-weight: 500;" @click="toLogin">立即登录</div>
......@@ -73,6 +73,12 @@ export default class Index extends Vue {
const { auth_suc } = this.userInfo;
return auth_suc ? 'yirenzheng' : 'weirenzheng';
}
get userIcon() {
if (this.userInfo.icon) {
return this.userInfo.icon;
}
return require('@/assets/defaultusericon.png');
}
get datas() {
const { auth_type, auth_suc } = this.userInfo;
return [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment