import {Injectable} from '@angular/core';
import {BehaviorSubject, Subscription} from 'rxjs';

@Injectable()
export class AppService {


    private mineSource: BehaviorSubject<any> = new BehaviorSubject({});
    public mineInfo = this.mineSource.asObservable();

    private dealSource: BehaviorSubject<any> = new BehaviorSubject("");
    public dealInfo = this.dealSource.asObservable();

    private noticeSource: BehaviorSubject<any> = new BehaviorSubject("");
    public noticeInfo = this.noticeSource.asObservable();

    //个人信息
    public setMine(value: any) {
        this.mineSource.next(value);
    }

    //待办信息
    public setDeal(value: any) {
        this.dealSource.next(value);
    }

    //消息提醒
    public setNotice(value: any) {
        this.noticeSource.next(value);
    }
}
