var root = "http://192.168.4.106:7777"
var server = "";
var oauth = "";
var projectName = "${projectName}"
var pName = projectName.split("/")[0];
var user = projectName.split("/")[1];
let appSettion = {
    projectName: projectName,
    url: eap.request,
    //默认服务url
    serverUrl: root + server,
    //授权服务url
    oauth: root + oauth,
    //数据保存url
    saveUrl: root + server + "/data/save", //'/data/save',
    //数据查询url
    queryUrl: root + server + "/data/query", //'/data/query',
    querysUrl: root + server + "/data/querys", //'/data/query',
    //数据策略url
    policyUrl: root + server + "/data/policy",
    //附件上传url
    upload: root + server + "/file/upload",
    //附件下载url
    download: root + server + "/file/download",
    //附件查看url
    preview: root + server + "/file/preview",
    //流程信息url
    getFlowInfo: root + server + "/flow/open",
    getApprovalInfo: root + server + "/flow/getApprovalInfo",
    processFlow: root + server + "/flow/processFlow",
    queryTask: root + server + "/flow/queryTask",
    withdrawtask: root + server + "/flow/withdrawtask",
    taskDiagram: root + server + "/flow/taskDiagram",
    openOrdernumber: root + server + "/flow/openOrdernumber",
    enumsUrl: root + server + "/platf/xtgn/enums/fgroupid/",
    policyUrl: root + server + "/data/policy",
    birtModel:  root + server + "/birt/model1",
    getProcessInfo:  root + server + '/flow/getProcessInfo',
    langUrl: root + server + "/lang/systable",
}
if (window.dynamicSetting) {
    appSettion = Object.assign(appSettion, window.dynamicSetting)
}
let notUrlKey = ["projectName"]
for (let prop in appSettion) {
    if (notUrlKey.indexOf(prop) && appSettion[prop] && typeof (appSettion[prop]) == 'string' && !appSettion[prop].toLowerCase().startsWith("http"))
        appSettion[prop] = appSettion.url + appSettion[prop];
}

export default appSettion;