/**
 * Created by supervisor on 2018/2/28.
 */
let baseUrl="";
let weUrl = "";
let basefileUrl="";
let routerMode='history';
let backToken = "back";
let frontToken = "front";

let ProUrl = ""
let appHomeUrl = ""
let skipLinkUrl = ""
getBaseUrl();

function getBaseUrl(){
  $.ajax({
    url: "./static/json/api.json",
    async: false,
    success: function(data){
      ProUrl = data.baseUrl || (window.location.protocol + '//' + window.location.host + '/');
      appHomeUrl = data.appHomeUrl;
      skipLinkUrl = data.skipLinkUrl;
    }
  })
}



if(process.env.NODE_ENV === 'development'){
  baseUrl=ProUrl
}else if(process.env.NODE_ENV === 'production'){
  baseUrl=ProUrl
}
export {
  baseUrl,
  weUrl,
  appHomeUrl,
  skipLinkUrl,
  backToken,
  frontToken,
  basefileUrl,
  routerMode
}
// process.env 是读取系统环境变量，在node命令窗口启动时设置相关的环境变量，NODE_ENV=development node来启动命令窗口
