import { Component } from '@angular/core';

@Component({
    selector: 'app-user-info',
    templateUrl: 'app-user-info.html',
    styleUrls: ['app-user-info.scss']
})
export class AppUserInfo {

    /**
     * 用户信息
     *
     * @type {*}
     * @memberof AppUserInfo
     */
    public userInfo: any = {};

    /**
     * Creates an instance of IBizUserInfo.
     * @memberof AppUserInfo
     */
    constructor() {
        const userInfo: string = window.localStorage.getItem('userInfo');
        if (userInfo) {
            try {
                this.userInfo = JSON.parse(userInfo);
            } catch (error) {
                console.error(error);
            }
        }
    }

}