environment.js 4.58 KB
const target = [
    'ip',
    'dev',
    'uat',
    'prod',
    'beta',
    'pet'
]
/**
 * 
0本地 
1开发 
2测试
3生产
4预发布
5压测
 */
const index = 1
const secretKey = {
    ip: {
    },
    dev: {
        sso: {
            appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
            secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
        },
    },
    uat: {
        sso: {
            appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
            secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
        }
    },
    beta: {
        sso: {
            appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
            secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
        },
    },
    prod: {
        sso: {
            appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
            secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
        },
    },
    pet: {
        sso: {
            appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
            secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b',
        },
    },
}[target[index]]
const djSecretKey = {
    ip: {
    },
    dev: {
        appKey: '48e5e13229b82c1b4e6e8c96151f0637',
        secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
    },
    uat: {
        appKey: '48e5e13229b82c1b4e6e8c96151f0637',
        secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
    },
    beta: {
        appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
        secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353',
    },
    prod: {
        appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
        secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
    },
    pet: {
        appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
        secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
    }
}[target[index]]

const domain = {
    ip: 'http://192.168.2.59:8292',
    // ip: 'http://192.168.2.80:8558',
    dev: 'https://scrm.dev.glsx.com.cn',
    beta: 'https://scrm.beta.glsx.com.cn', //预发布 appid: wx9f91c1ec493eb425
    uat: 'https://scrm.test.glsx.com.cn', //测试 appid: wxe10067a63c1856ac
    prod: 'https://scrm.glsx.com.cn',
    pet: 'https://cdptest.glsx.com.cn' //压测 appid: wx7ce755e425603084
}[target[index]]

const djDomain = {
    ip: 'http://192.168.2.59:8292',
    // ip: 'http://192.168.2.80:8558',
    dev: 'https://dj.dev.glsx.com.cn',
    beta: 'https://dj.beta.glsx.com.cn', //预发布 appid: wx9f91c1ec493eb425
    uat: 'https://dj.test.glsx.com.cn', //测试 appid: wxe10067a63c1856ac
    prod: 'https://dj.glsx.com.cn',
    pet: 'https://cdptest.glsx.com.cn' //压测 appid: wx7ce755e425603084
}[target[index]]
const merchantDomain = {
    ip: 'http://rop-merchant.dev.glsx.com.cn',
    dev: 'http://rop-merchant.dev.glsx.com.cn',
    beta: 'https://rop-merchant.beta.glsx.com.cn',
    uat: 'https://rop-merchant.test.glsx.com.cn',
    prod: 'https://commodity.glsx.com.cn',
    pet: ''
}[target[index]]

const pathEnum = {
    sso: '/rop-scrm-sso/',
    shopmall: '/rop-scrm-shopmall/',
    coupon: '/rop-scrm-coupon/',
    carlife: '/rop-scrm-carlife/',
    live: '/rop-scrm-live/',
    equity: '/rop-scrm-equity/',
    entmicro: '/rop-scrm-entmicro/',
    wechat: '/rop-scrm-wechat/',
    boutiquecoupon: '/rop-scrm-boutiquecoupon/',
    material: '/rop-scrm-marketing/', //素材
    sop: '/rop-scrm-sop/',
    customercollect: '/rop-scrm-bigdatautil/',
    drac: '/rop-scrm-entmicro/',
    withdrawal: '/rop-scrm-stoassistant/',
    score: '/rop-scrm-stoassistant/',
    stoassistant: '/rop-scrm-stoassistant/',
    assistant: '/rop-scrm-stoassistant/',
    mission: '/rop-scrm-stoassistant/',
    busassistant: '/rop-scrm-busassistant/',
    drac: '/rop-scrm-entmicro/',
    bigdatautil: '/rop-scrm-bigdatautil/',
    payment: '/rop-scrm-entmicro/',
    business: '/rop-scrm-entmicro/',
    system: '/rop-scrm-entmicro/',
    marketing: '/rop-scrm-marketing/',
    follow: '/rop-scrm-stoassistant/',
    smartcarlife: '/rop-dj-car-boutique/',
    supermarket: '/rop-scrm-marketing/',
    integral: '/rop-scrm-stoassistant/',
    tobshopmall: '/rop-scrm-stoassistant/',
    clue: '/rop-scrm-clue/',
    'rop-merchants': '/rop-merchants/'
}
const equityAppId = {
    ip: 'wx56bed167ad463f70',
    dev: 'wx56bed167ad463f70',
    uat: 'wx91ef13a183a554f5',
    prod: 'wx112e77e8828babdd',
}[target[index]]
const defaultMerchantId = {
    ip: '44184606',
    dev: '44184606',
    uat: '44184606',//测试环境
    beta: '44211290',//预发布
    prod: '101430',
}[target[index]]
module.exports = {
    index,
    domain,
    merchantDomain,
    pathEnum,
    secretKey,
    djSecretKey,
    equityAppId,
    defaultMerchantId,
    djDomain
}