'use strict';
var redis = 'redis'
var db = 'db'

module.exports = {
    ip: process.env.OPENSHIFT_NODEJS_IP || process.env.IP || undefined,
    port: 80,
    hostname: 'https://sappbackend.xyqb.com',
    secrets: {
        session: process.env.SECRETS_SESSION || 'xyqb-app-api-prod-0.0.1'
    },
    usercenter: {
        host: db,
        user: 'qa',
        password: 'qatest',
        database: 'xyqb_user'
    },
    db: {
		host: db,
        user: 'qa',
        password: 'qatest',
		    database: 'xyqb'
    },
  	coreDb: {
  		host: db,
  		user: 'qa',
  		password: 'qatest',
  		database: 'xyqb_app'
  	},
  	mallDb: {
  		host: db,
  		user: 'qa',
  		password: 'qatest',
  		database: 'mall'
  	},
    msgDb: {
        host: db,
        user: 'qa',
        password: 'qatest',
        database: 'msg'
    },
  	redis: {
  		host: redis,
  		port: '6379'
  	},
    jd: {
        root: 'https://router.jd.com'
    },
    xyqbQuery: {
        root: 'http://query.xyqb.com'
    },
    userServer: {
        //host: 'http://auth.xyqb.com' // 密码登录
        host: 'http://passportapi2.xyqb.com' //函谷关迁移至用户中心
    },
    xyqbapiServer: {
        root: 'http://api.xyqb.com'
    },
    xyqbOfflineApiServer: {
        root: 'http://offapi.xyqb.com'
    },
    userCenterApiServer: {
        root: 'http://passportapi2.xyqb.com'
    },
    spiderCenter:{
        root: 'http://scapi.xyqb.com',
        host: 'http://139.198.2.95:38099', //this is v2
    },
    loanAPIServer: {
        root: 'http://api.xyqb.com',
        loginUrl: 'http://passportapi2.xyqb.com/app/login2' // 免密登录，函谷关迁移至用户中心
    },
    blankNote: {
        root: 'http://btapi.xyqb.com'
    },
    opBackend: {
        root: 'http://displayapi.xyqb.com'
    },
    mall: {
        root: 'http://mallapi.xyqb.com',
        authRoot: 'http://mallapi.xyqb.com',
        clientIp: '61.50.125.14', // 公司的外网IP
        jd: {
            app_key: '319e864090664a499ee6417b9e243f62'
        }
    },
    op: {
        root: 'http://mallapi.xyqb.com',
    },
    score: { //积分系统
        root: 'http://scoreapi.xyqb.com',
    },
    redPacket: { // 红包系统
        root: 'http://redpacket.xyqb.com',
    },
    authorization: {
        root: 'http://mock.q-gp.com/SpiderServer/api',
        haoxindu: {
            root: 'http://openapi.quantgroup.cn/qauth'
        },
        zhima: {
            root: 'http://api.xyqb.com',
            rootscore:'http://rapi.xyqb.com'
        }
    },
    activities: {
        repaymentLottery: {
            url: 'https://wechat.xyqb.com/turntable.html'
        },
        redEnvelop: {
            startAt: '2016-03-15',
            finishAt: '2016-04-01'
        },
        invitation: {
            startAt: '2016-03-15',
            finishAt: '2016-04-01'
        },
        pickCoin: {
            startAt: '2016-02-29',
            finishAt: '2016-03-21'
        },
        blankNoteRedEnvelop: {
            startAt: '2016-04-01',
            finishAt: '2016-05-01'
        }
    },
    loanProcess: {
        h5Host: 'https://m.xyqb.com'
    },
    blanknote: {
        h5Host: 'https://bt.xyqb.com'
    },
    mallH5Host: 'https://new-mall.xyqb.com',

    activity: {
        h5Host: 'https://activity.xyqb.com'
    },
    baseUI: {
        host: 'https://h5.xyqb.com'
    },
    rabbitMQ: {
        host: redis,
        user: 'qa',
        password: 'qatest'
    },
    userCreditApiServer: {
        root: 'http://member.xyqb.com'
    }
};
