提交 33fcbcbb 编写于 作者: WodahsOrez's avatar WodahsOrez

lxm--用户名识别

上级 9eebbef9
...@@ -11,6 +11,27 @@ import './app-user-info.less'; ...@@ -11,6 +11,27 @@ import './app-user-info.less';
@Component({}) @Component({})
export class AppUserInfo extends Vue { export class AppUserInfo extends Vue {
/**
* 用户名
*
* @memberof AppUserInfo
*/
public username = "埃";
/**
* vue 生命周期
*
* @memberof AppUserInfo
*/
public mounted() {
if(this.$store.getters.getAppData()){
if(this.$store.getters.getAppData().context && this.$store.getters.getAppData().context.srfusername){
let _username = this.$store.getters.getAppData().context.srfusername;
this.username = _username.substr(0,1).toUpperCase();
}
}
}
/** /**
* 绘制用户信息内容 * 绘制用户信息内容
* *
...@@ -20,7 +41,7 @@ export class AppUserInfo extends Vue { ...@@ -20,7 +41,7 @@ export class AppUserInfo extends Vue {
public render(): any { public render(): any {
return <div class="crm-app-user-info"> return <div class="crm-app-user-info">
<div class="user-head-sculpture"> <div class="user-head-sculpture">
{this.username}
</div> </div>
<span> <span>
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAUCAYAAACqJ5zlAAAAN0lEQVQoU2PsmLzCk5Hh/0wGBgaG/wyM6Yydk5c/+s/AIAsSYGRgeIwpgKEFpBQZMJIhMIzcAQAhOjo7JEcKTQAAAABJRU5ErkJggg=="></img> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAUCAYAAACqJ5zlAAAAN0lEQVQoU2PsmLzCk5Hh/0wGBgaG/wyM6Yydk5c/+s/AIAsSYGRgeIwpgKEFpBQZMJIhMIzcAQAhOjo7JEcKTQAAAABJRU5ErkJggg=="></img>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册