/**
 * 全局相关配置
 */
// 对外暴露全局常量及函数
export default {
  //localStorage
  setUserInfo: function (user) {
    localStorage.setItem('fLoginUser', JSON.stringify(user));
  },
  //clear
  logout: function () {
    localStorage.removeItem('fLoginUser');
    localStorage.removeItem('accessToken');
  },
  getUserInfo: function () {
    return JSON.parse(localStorage.getItem('fLoginUser'));
  },
  //token
  setToken: function (data) {
    localStorage.setItem('accessToken', data);
  },
  //获取token
  getToken: function () {
    return localStorage.getItem('accessToken');
  },
  baseURL: process.env.VUE_APP_BASE_URL,
  //version
  version: function () {
    return '1.0.1'
  },
}

