package com.wd.workoffice.util;


import android.text.TextUtils;

import com.alibaba.fastjson.JSON;
import com.wd.workoffice.bean.TokenBean;
import com.wd.workoffice.bean.UserInfoBean;

import java.util.List;

import flexible.xd.android_base.utils.SPUtils;

/**
 * Created by Flexible on 2017/1/9 0009.
 */

public class DataKeeper {
    private volatile static DataKeeper keeper;
    private SPUtils sp = SPUtils.getInstance("DataKeeper");
    private final String MES_MENU_ID = "MES_MENU_ID";

    private DataKeeper() {
    }

    public static DataKeeper getInstance() {
        if (keeper == null) {
            synchronized (DataKeeper.class) {
                if (keeper == null) {
                    keeper = new DataKeeper();
                }
            }
        }
        return keeper;
    }
    /**
     * mes菜单id
     *
     * @param info
     */
    public void keepMenuId(String info) {
        sp.put(MES_MENU_ID, info);
    }

    public String getMenuId() {
        return sp.getString(MES_MENU_ID);
    }

    public void clearMenuId() {
        sp.put(MES_MENU_ID, false);
    }

    public void clearAll() {
        clearMenuId();
    }
}
