"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayConfig = void 0;
const CookieUtils_1 = require("../utils/CookieUtils");
/**
 * 微服务客户端配置
 * @author WuFengLin
 */
class GatewayConfig {
    constructor() {
        /**
         * 开发环境服务地址
         */
        this.hostAddressDev = 'https://bms-service-dev.keytop.cn/';
        /**
         * 测试网关服务地址
         */
        this.hostAddressTest = 'https://bms-service-test.keytop.cn/';
        /**
         * 生产网关服务地址
         */
        this.hostAddressPord = 'https://bms-service.keytop.cn/';
    }
    /**
     * 获取网关环境地址
     * 从Cookie中环境类型动态获取网关域名
     */
    getHostAddress() {
        const envType = CookieUtils_1.default.get('KT_ME_ENV_TYPE') || CookieUtils_1.default.get('kt_me_env_type') || 'PROD';
        if (envType == 'DEV') {
            return this.hostAddressDev;
        }
        else if (envType == 'TEST') {
            return this.hostAddressTest;
        }
        else {
            return this.hostAddressPord;
        }
    }
}
exports.GatewayConfig = GatewayConfig;
//# sourceMappingURL=GatewayConfig.js.map