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

/**
 * 全局变量
 */

@Injectable()
export class GlobalData {

    private _videoNum: number = 1; // 播放器状态
    private _token: string;
    private _userObj: any;
    private _area: any;
    private _roles: any;
    private _history: Array<String>;


    get videoNum(): number {
        return this._videoNum;
    }

    set videoNum(value: number) {
        this._videoNum = value;
    }

    //token
    get token(): string {
        return this._token;
    }

    set token(value: string) {
        this._token = value;
    }

    //用户信息
    get userObj(): any {
        return this._userObj;
    }

    set userObj(value: any) {
        this._userObj = value;
    }

    //区属or市属
    get area(): any {
        return this._area;
    }

    set area(value: any) {
        this._area = value;
    }

    //权限
    get roles(): any {
        return this._roles;
    }

    set roles(value: any) {
        this._roles = value;
    }

    //搜索的历史记录
    get history(): any {
        return this._history;
    }

    set history(value: any) {
        this._history = value;
    }

}
