Authored by 李奇

配置文件修改

... ... @@ -10,25 +10,15 @@ const pkg = require('../package.json');
const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
const domains = {
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
global: 'http://global-test-soa.yohops.com:9999',
liveApi: 'http://testapi.live.yohops.com:9999/',
imSocket: 'ws://socket.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api',
platformApi: 'http://192.168.102.48:8088/'
};
module.exports = {
app: 'h5',
appVersion: '5.8.0', // 调用api的版本
port: 6006,
siteUrl: '//m.yohobuy.com',
assetUrl: '//127.0.0.1:5001',
testCode: 'yoho4946abcdef#$%&!@',
domains: domains,
domains: {
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/'
},
corsAllowOrigin: [
'http://localhost:8081',
'http://localhost:63342'
... ... @@ -65,35 +55,6 @@ module.exports = {
prettyPrint: true
}
},
thirdLogin: {
wechat: {
appID: 'wx75e5a7c0c88e45c2',
appSecret: 'ce21ae4a3f93852279175a167e54509b'
}
},
zookeeperServer: '127.0.0.1:2181',
maxQps: 1200,
geetestJs: '//static.geetest.com/static/tools/gt.js',
jsSdk: '//cdn.yoho.cn/js-sdk/1.2.2/jssdk.js',
redis: {
connect: {
host: '127.0.0.1',
port: '6379',
retry_strategy(options) {
if (options.error && options.error.code === 'ECONNREFUSED') {
console.log('redis连接不成功');
}
if (options.total_retry_time > 1000 * 60 * 60 * 6) {
console.log('redis连接超时');
return;
}
if (options.attempt > 10) {
return 1000 * 60 * 60 * 0.5;
}
return Math.min(options.attempt * 100, 1000);
}
}
},
mysql: {
connect: {
host: 'localhost',
... ... @@ -118,11 +79,8 @@ if (isProduction) {
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/',
global: 'http://api-global.yohobuy.com',
store: '', // 线上域名尚未确定
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/',
imSocket: 'wss://imsocket.yohobuy.com:443',
imCs: 'https://imhttp.yohobuy.com/api',
platformApi: 'http://api.platform.yohoops.org'
},
corsAllowOrigin: ['http://ad.yoho.cn', 'https://ad.yoho.cn'],
... ... @@ -135,51 +93,7 @@ if (isProduction) {
timeout: 1000,
retries: 0
},
useCache: true,
interfaceShunt: {
open: false,
url: 'http://123.206.2.55/strategy'
},
zookeeperServer: 'web.zookeeper.yohoops.org:2181',
alipayConfig: {
payUrl: 'https://mapi.alipay.com/gateway.do',
service: 'alipay.wap.create.direct.pay.by.user',
partner: '2088701661478015',
inputCharset: 'utf-8',
notifyUrl: 'http://service.yoho.cn/payment/alipay_notify',
returnUrl: '/shopping/pay/aliwapreturn',
signType: 'MD5',
paymentType: '1',
alipayKey: 'kcxawi9bb07mzh0aq2wcirsf9znusobw',
sellerMail: 'zfb@yoho.cn',
merchantUrl: 'http://m.yohobuy.com/home/orderDetail?order_code='
},
WxPayConfig: {
appId: 'wx75e5a7c0c88e45c2',
mchId: '1227694201',
key: '7e6f3307b64cc87c79c472814b88f7fb',
appSecret: 'ce21ae4a3f93852279175a167e54509b',
notifyUrl: 'http://service.yoho.cn/payment/weixin_notify',
},
redis: {
connect: {
host: 'web.redis.yohoops.org'
},
port: '6379',
retry_strategy(options) {
if (options.error && options.error.code === 'ECONNREFUSED') {
console.log('redis连接不成功');
}
if (options.total_retry_time > 1000 * 60 * 60 * 6) {
console.log('redis连接超时');
return;
}
if (options.attempt > 10) {
return 1000 * 60 * 60 * 0.5;
}
return Math.min(options.attempt * 100, 1000);
}
}
useCache: true
});
} else if (isTest) {
Object.assign(module.exports, {
... ... @@ -192,8 +106,6 @@ if (isProduction) {
store: process.env.TEST_STORE || 'http://192.168.102.210:8080/portal-gateway/',
liveApi: process.env.TEST_LIVE || 'http://testapi.live.yohops.com:9999/',
singleApi: process.env.TEST_SINGLE || 'http://api-test1.yohops.com:9999/',
imSocket: process.env.TEST_IM_SOCKET || 'ws://socket.yohobuy.com:10240',
imCs: process.env.TEST_IM_CS || 'http://im.yohobuy.com/api',
platformApi: 'http://192.168.102.48:8088/'
},
memcache: {
... ... @@ -204,26 +116,6 @@ if (isProduction) {
reconnect: 5000,
retries: 0
},
useCache: true,
alipayConfig: {
payUrl: 'https://mapi.alipay.com/gateway.do',
service: 'alipay.wap.create.direct.pay.by.user',
partner: '2088701661478015',
inputCharset: 'utf-8',
notifyUrl: (process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/') + 'payment/alipay_notify',
returnUrl: '/shopping/pay/aliwapreturn',
signType: 'MD5',
paymentType: '1',
alipayKey: 'kcxawi9bb07mzh0aq2wcirsf9znusobw',
sellerMail: 'zfb@yoho.cn',
merchantUrl: 'http://m.yohobuy.com/home/orderDetail?order_code='
},
WxPayConfig: {
appId: 'wx75e5a7c0c88e45c2',
mchId: '1227694201',
key: '7e6f3307b64cc87c79c472814b88f7fb',
appSecret: 'ce21ae4a3f93852279175a167e54509b',
notifyUrl: (process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/') + 'payment/weixin_notify',
}
useCache: true
});
}
... ...