module.exports = {
    current: { server: "192.168.1.184", port: "60666" },
    defaultLicenseKey: 'glyun.smartcost.com.cn|gluat.smartcost.com.cn|glm.smartcost.com.cn|glum.smartcost.com.cn|jladmin.smartcost.com.cnjlqaadmin.smartcost.com.cn|jluatadmin.smartcost.com.cn|yhqa.smartcost.com.cn|yhqm.smartcost.com.cn|yhuat.smartcost.com.cn|yhum.smartcost.com.cn|yhyun.smartcost.com.cn|yhm.smartcost.com.cn|ym.smartcost.com.cn|qm.smartcost.com.cn|um.smartcost.com.cn|civil.smartcost.com.cn|yun.smartcost.com.cn|cloud.smartcost.com.cn|qa.smartcost.com.cn|uat.smartcost.com.cn|zbqa.smartcost.com.cn|zbuat.smartcost.com.cn|jlqa.smartcost.com.cn|jluat.smartcost.com.cn|zb.smartcost.com.cn|jl.smartcost.com.cn,681116852352674#A0Zdc36Y4JXYtNnL4FWdolHLuNmLt36YuQ7cvNGdyFWbz9SbxhWes86Yu46bj9Cdz36Y4JXYtNnLhFHa9xibj9SbvNmL4N7bjRnch56cu8WatRWY4FWdspGLuNmLt36YuQ7cvNGdyFWbz9ibp5GZhFWcspmbj9SbvNmL4N7bjRnch56cu8WatRWYspGLuNmLt36YuQ7cvNGdyFWbz9Sb5x6Zs86Yu46bj9Cdz36Y4JXYtNnLtx6Zs86Yu46bj9Cdz36Y4JXYtNnL4FWdsdGLuNmLt36YuQ7cvNGdyFWbz9ib5lHbnJiOiMXbEJCLig1jlzahlDZmpnInmb1uk/avoDrlmvJilrKqmXrunfbtmD0jnLiOiEmTDJCLiQzN6ITNzITN8YTMxEDO6IiOiQWSiwSflNHbhZmOiI7ckJye0ICbuFkI1pjIEJCLi4TPRF7SI9EWZRkQ0VER9I6Sa34KqdXO7hTTDFVbIpUOiVTaz5Ub73GcvY5YFlUcslEWSJzVy4GWBlkNwV6KmVGTtp5Y996axVkeHdTRx9UawIjSFJER6lmI0IyUiwiN6IDOxQTNwAjM0IicfJye35XX3JyMiZzZiojIDJCLiETMuYHITpEIkFWZyB7UiojIOJyebpjIkJHUiwiI7QzM4kDMgcTM8ADMyAjMiojI4J7QiwiIuNmLt36YuQ7cvNGdyFWbz9Cbqxibj9SbvNmL4N7bjRnch56cuImes86Yu46bj9Cdz36Y4JXYtNnL4FWdspGLuNmLt36YuQ7cvNGdyFWbz9SYxxmas86Yu46bj9Cdz36Y4JXYtNnL4FWdipHLuNmLt36YuQ7cvNGdyFWbz9SYxJmes86Yu46bj9Cdz36Y4JXYtNnL4FWds86Yu46bj9Cdz36Y4JXYtNnLhFHLuNmLt36YuQ7cvNGdyFWbz9CZ53Gbjxibj9SbvNmL4N7bjRnch56cu8Wd9xibj9SbvNmL4N7bjRnch56cuwWa6l6Ys86Yu46bj9Cdz36Y4JXYtNnLtVHLuNmLt36YuQ7cvNGdyFWbz9Sbxxibj9SbvNmL4N7bjRnch56cu4Wes86Yu46bj9Cdz36Y4JXYtNnLthWes86Yu46bj9Cdz36Y4JXYtNnLuVXeolHLuNmLt36YuQ7cvNGdyFWbz9Sb5hWes86Yu4Jb55',
    local: { server: "localhost", port: "27017" },
    qa: {
        server: "192.168.1.90",
        port: "60666",
        options: {
            user: 'smartcost',
            pass: 'smartcost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 60000,
            useMongoClient: true
        }
    },
    pp: {
        server: "172.18.111.231",
        port: "27017",
        options: {
            user: 'smartcost',
            pass: 'SmartCost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 50000,
            useMongoClient: true
        }
    },
    uat: {
        server: "112.74.42.187",
        port: "27017",
        options: {
            user: 'smartcost',
            pass: 'SmartCost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 50000,
            useMongoClient: true
        }
    },
    prod_s: {
        server: "112.74.42.187",
        port: "28066",
        options: {
            user: 'smartcost',
            pass: 'SmartCost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 50000,
            useMongoClient: true
        }
    },
    prod: {
        dbURL: "mongodb://smartcost:SmartCost3850888@dds-wz9da4d5ca0fdd341.mongodb.rds.aliyuncs.com:3717,dds-wz9da4d5ca0fdd342.mongodb.rds.aliyuncs.com:3717/yanghu?authSource=admin;replicaSet=mgset-7518601"
        //LicenseKey:"civil.smartcost.com.cn|yun.smartcost.com.cn|cloud.smartcost.com.cn,834986144349993#A0BfNtmD0jnLiOiEmTDJCLiMTO9kDNzQDNxYDO9QzM8IiOiQWSiwSflNHbhZmOiI7ckJye0ICbuFkI1pjIEJCLi4TP7BzU6d7Z9RFbrRzNNNHNFJzStVFU7llaFdkeNdDV59UYkBjWxRjUOBlW7siYu5UeVp4ZyFUd4hDZ996S5JDNJV4cXF6dvJlNTFVNuZmdPdFSj3iV8tkI0IyUiwyN7AzNxYzN7MTM0IicfJye#4Xfd5nIzImNnJiOiMkIsISMx8idgMlSgQWYlJHcTJiOi8kI1tlOiQmcQJCLiADN5QTMwACMzcDM8EDMyIiOiQncDJCLi86Yu46bj9Cdz36Y4JXYtNnLkV7bsNGLuNmLt36YuQ7cvNGdyFWbz9ib5lHLuNmLt36YuQ7cvNGdyFWbz9CbpZXajJiOiMXbEJCLig1jlzahlDZmpnInmb1uk/avoDrlmvJilrKqRXMu"
    },
    qa_sc: {
        title: "全国公路",
        startPort: 3080,
        server: "192.168.1.90",
        port: "60667",
        dbname: 'smartcost',
        options: {
            user: 'smartcost',
            pass: 'smartcost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 60000,
            useMongoClient: true
        }
    },
    pp_sc: {
        title: "全国公路",
        startPort: 3080,
        server: "172.18.111.231",
        port: "27017",
        dbname: 'smartcost',
        options: {
            user: 'smartcost',
            pass: 'SmartCost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 50000,
            useMongoClient: true
        }
    },
    prod_sc: {
        title: "全国公路",
        startPort: 3080,
        server: "172.18.111.231",
        port: "27017",
        dbname: 'smartcost',
        options: {
            user: 'smartcost',
            pass: 'SmartCost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 50000,
            useMongoClient: true
        }
        //dbURL:"mongodb://smartcost:SmartCost3850888@dds-wz9da4d5ca0fdd341.mongodb.rds.aliyuncs.com:3717,dds-wz9da4d5ca0fdd342.mongodb.rds.aliyuncs.com:3717/smartcost?authSource=admin;replicaSet=mgset-7518601"
        //LicenseKey:"civil.smartcost.com.cn|yun.smartcost.com.cn|cloud.smartcost.com.cn,834986144349993#A0BfNtmD0jnLiOiEmTDJCLiMTO9kDNzQDNxYDO9QzM8IiOiQWSiwSflNHbhZmOiI7ckJye0ICbuFkI1pjIEJCLi4TP7BzU6d7Z9RFbrRzNNNHNFJzStVFU7llaFdkeNdDV59UYkBjWxRjUOBlW7siYu5UeVp4ZyFUd4hDZ996S5JDNJV4cXF6dvJlNTFVNuZmdPdFSj3iV8tkI0IyUiwyN7AzNxYzN7MTM0IicfJye#4Xfd5nIzImNnJiOiMkIsISMx8idgMlSgQWYlJHcTJiOi8kI1tlOiQmcQJCLiADN5QTMwACMzcDM8EDMyIiOiQncDJCLi86Yu46bj9Cdz36Y4JXYtNnLkV7bsNGLuNmLt36YuQ7cvNGdyFWbz9ib5lHLuNmLt36YuQ7cvNGdyFWbz9CbpZXajJiOiMXbEJCLig1jlzahlDZmpnInmb1uk/avoDrlmvJilrKqRXMu"
    },
    qa_hw: {
        title: "公路2.0",
        startPort: 4080,
        server: "192.168.1.90",
        port: "60666",
        dbname: 'stdHighway',
        options: {
            user: 'wisecost',
            pass: 'Smartcost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 60000,
            useMongoClient: true
        }
    },
    uat_hw: {
        title: "公路2.0",
        startPort: 4080,
        server: "112.74.42.187",
        port: "27017",
        dbname: 'stdHighway',
        options: {
            user: 'wisecost',
            pass: 'Smartcost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 50000,
            useMongoClient: true
        }
    },
    prod_hw: {
        title: "公路2.0",
        startPort: 4080,
        dbURL: "mongodb://wisecost:Smartcost3850888@dds-wz9ec47d7af4a2e41.mongodb.rds.aliyuncs.com:3717,dds-wz9ec47d7af4a2e42.mongodb.rds.aliyuncs.com:3717/stdHighway?authSource=admin&replicaSet=mgset-60527349&maxPoolSize=10",
        LicenseKey: "yun2.smartcost.com.cn|ym2.smartcost.com.cn|zhyun.smartcost.com.cn|zhym.smartcost.com.cn,681116852352674#A0AWS+mIWuqoaet0e+t5aOoPeuI0ISYONkIsICN7YjM5MjM5gjNxETM8YjI0ICZJJCL3V6csFmZ0IiczRmI1pjIs9WQisnOiQkIsISP3c6ZUVmbDRzcvcGaqZDSK36SWdmUzEEa7hlR8knNwEjZqVmTDhDctR4aaFlY7YGWwhVYQl6NWlUQP9kRHdHWoJmeBhHcRJzR79kMKZjclRnYjVGSPBFciojITJCL5MjMxgTNzQjM0IicfJye&Qf35VfiMjY6cmI0IyQiwiIxEjL6ByUKBCZhVmcwNlI0IiTis7W0ICZyBlIsISNyQDMwEDI8IDNwIjMwIjI0ICdyNkIsIibj9SbvNmL4N7bjRnch56cu4WeopHLuNmLt36YuQ7cvNGdyFWbz9ib5lHa0xibj9SbvNmL4N7bjRnch56cuITb9xibj9SbvNmL4N7bjRnch56cuIjb5lnI0IyctRkIsICuPWOrFWOkZmeicaut1S+I1RO"
    },
    local2prod_hw: {
        title: "公路2.0",
        startPort: 4080,
        server: "112.74.42.187",
        port: "28033",
        dbname: 'stdHighway',
        options: {
            user: 'wisecost',
            pass: 'Smartcost3850888',
            auth: {
                "authdb": "admin"
            },
            connectTimeoutMS: 50000,
            useMongoClient: true
        }
    },
    setupDb: function (env = "local") {
        let me = this;
        me.current.server = me[env].server;
        me.current.port = me[env].port;
    },
    getSessionURL: function (env = "local") {
        let me = this;
        let dbname = "yanghu";
        if (me[env].dbname) dbname = me[env].dbname;
        if (me[env].dbURL) {
            return me[env].dbURL.replace(dbname, dbname + 'Managers');
        }

        let manageDb = dbname == 'stdHighway' ? dbname : dbname + 'Managers';
        if (me[env].options) {
            return 'mongodb://' + me[env].options.user + ':' + me[env].options.pass + '@' + me[env].server + ':' + me[env].port + '/' + manageDb + '?authSource=admin';
        } else {
            return 'mongodb://' + me[env].server + ':' + me[env].port + '/' + manageDb;//'mongodb://' + config.current.server + ':' + config.current.port + '/yanghuManagers'
        }
    },
    getLicenseKey: function (env = "local") {
        let me = this;
        if (me[env].LicenseKey) {
            return me[env].LicenseKey;
        } else {
            return me.defaultLicenseKey;
        }
    },
    pageSize: 20
};