...
|
...
|
@@ -9,10 +9,10 @@ |
|
|
const from = require('./from');
|
|
|
|
|
|
const isProduction = process.env.NODE_ENV === 'production';
|
|
|
const isTest = process.env.NODE_ENV === 'test3' || process.env.NODE_ENV === 'test'; // 兼容.9(test3) .49(test)
|
|
|
const isTest =
|
|
|
process.env.NODE_ENV === 'test3' || process.env.NODE_ENV === 'test'; // 兼容.9(test3) .49(test)
|
|
|
|
|
|
const domains = {
|
|
|
|
|
|
// api: 'http://api.yoho.cn/',
|
|
|
//
|
|
|
// service: 'http://service.yoho.cn/',
|
...
|
...
|
@@ -49,7 +49,7 @@ const domains = { |
|
|
|
|
|
module.exports = {
|
|
|
app: 'h5',
|
|
|
appVersion: '6.6.0', // 调用api的版本
|
|
|
appVersion: '6.8.9', // 调用api的版本
|
|
|
appName: 'yohobuywap-node',
|
|
|
port: 6001,
|
|
|
siteUrl: '//m.yohobuy.com',
|
...
|
...
|
@@ -59,14 +59,14 @@ module.exports = { |
|
|
|
|
|
// yohoVerifyUdid: 'ca5c462a-e28b-407d-8061-5e204398e3cc', // 用于本地调线上接口验签
|
|
|
signExtend: {
|
|
|
business_line: 'yohobuy'
|
|
|
business_line: 'yohobuy',
|
|
|
},
|
|
|
aliasDomains: ['activity.yoho.cn'],
|
|
|
report: {
|
|
|
host: 'badjs.yoho.cn',
|
|
|
port: 80,
|
|
|
db: 'web-apm',
|
|
|
immediate: true
|
|
|
immediate: true,
|
|
|
},
|
|
|
subDomains: {
|
|
|
host: '.m.yohobuy.com',
|
...
|
...
|
@@ -76,7 +76,7 @@ module.exports = { |
|
|
search: '//search.m.yohobuy.com',
|
|
|
huodong: '//huodong.m.yohobuy.com',
|
|
|
activity: '//activity.yohobuy.com',
|
|
|
index: '//m.yohobuy.com'
|
|
|
index: '//m.yohobuy.com',
|
|
|
},
|
|
|
useCache: false,
|
|
|
loggers: {
|
...
|
...
|
@@ -90,7 +90,7 @@ module.exports = { |
|
|
maxsize: Math.pow(1024, 3),
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
errorFile: {
|
|
|
close: true,
|
...
|
...
|
@@ -103,14 +103,14 @@ module.exports = { |
|
|
handleExceptions: true,
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
console: {
|
|
|
level: 'debug',
|
|
|
colorize: 'all',
|
|
|
prettyPrint: true,
|
|
|
debugStdout: true
|
|
|
}
|
|
|
debugStdout: true,
|
|
|
},
|
|
|
},
|
|
|
zookeeperServer: '127.0.0.1:2181',
|
|
|
alipayConfig: {
|
...
|
...
|
@@ -124,7 +124,7 @@ module.exports = { |
|
|
paymentType: '1',
|
|
|
alipayKey: 'kcxawi9bb07mzh0aq2wcirsf9znusobw',
|
|
|
sellerMail: 'zfb@yoho.cn',
|
|
|
merchantUrl: 'http://m.yohobuy.com/home/orderDetail?order_code='
|
|
|
merchantUrl: 'http://m.yohobuy.com/home/orderDetail?order_code=',
|
|
|
},
|
|
|
WxPayConfig: {
|
|
|
appId: 'wx75e5a7c0c88e45c2',
|
...
|
...
|
@@ -155,14 +155,14 @@ module.exports = { |
|
|
} else {
|
|
|
return 1000 * 10;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
session: {
|
|
|
host: '127.0.0.1',
|
|
|
port: '6379',
|
|
|
pass: '',
|
|
|
prefix: 'yohobuy_session:'
|
|
|
}
|
|
|
prefix: 'yohobuy_session:',
|
|
|
},
|
|
|
},
|
|
|
REQUEST_LIMIT: {
|
|
|
// 10s 最多访问20次
|
...
|
...
|
@@ -175,11 +175,11 @@ module.exports = { |
|
|
60: 60,
|
|
|
|
|
|
// 100s 最多访问200次
|
|
|
600: 200
|
|
|
600: 200,
|
|
|
},
|
|
|
LIMITER_IP_TIME: 3600, // 超出访问限制ip限制访问1小时
|
|
|
superCapture: '93c70db61fe276f93ce781ad17dc47cd',
|
|
|
from: from
|
|
|
from: from,
|
|
|
};
|
|
|
|
|
|
if (isProduction) {
|
...
|
...
|
@@ -197,7 +197,7 @@ if (isProduction) { |
|
|
platformApi: 'http://api.platform.yohoops.org',
|
|
|
extstore: 'http://extstore.yohobuy.com',
|
|
|
yohoNowApi: 'http://new.yohoboys.com/',
|
|
|
yoLuck: 'https://action.yoho.cn'
|
|
|
yoLuck: 'https://action.yoho.cn',
|
|
|
},
|
|
|
useCache: true,
|
|
|
zookeeperServer: 'web.zookeeper.yohoops.org:2181',
|
...
|
...
|
@@ -212,7 +212,7 @@ if (isProduction) { |
|
|
paymentType: '1',
|
|
|
alipayKey: 'kcxawi9bb07mzh0aq2wcirsf9znusobw',
|
|
|
sellerMail: 'zfb@yoho.cn',
|
|
|
merchantUrl: 'http://m.yohobuy.com/home/orderDetail?order_code='
|
|
|
merchantUrl: 'http://m.yohobuy.com/home/orderDetail?order_code=',
|
|
|
},
|
|
|
WxPayConfig: {
|
|
|
appId: 'wx75e5a7c0c88e45c2',
|
...
|
...
|
@@ -228,7 +228,10 @@ if (isProduction) { |
|
|
password: 'redis9646',
|
|
|
enable_offline_queue: false,
|
|
|
retry_strategy(options) {
|
|
|
if (options.error && options.error.code === 'ECONNREFUSED') {
|
|
|
if (
|
|
|
options.error &&
|
|
|
options.error.code === 'ECONNREFUSED'
|
|
|
) {
|
|
|
console.log('connect redis server fail');
|
|
|
}
|
|
|
|
...
|
...
|
@@ -239,20 +242,20 @@ if (isProduction) { |
|
|
} else {
|
|
|
return 1000 * 10;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
session: {
|
|
|
host: 'redis.web.yohoops.org',
|
|
|
port: '6379',
|
|
|
pass: 'redis9646',
|
|
|
prefix: 'yohobuy_session:'
|
|
|
}
|
|
|
prefix: 'yohobuy_session:',
|
|
|
},
|
|
|
},
|
|
|
report: {
|
|
|
host: 'badjs.yohoops.org',
|
|
|
port: 80,
|
|
|
db: 'web-apm',
|
|
|
immediate: true
|
|
|
immediate: true,
|
|
|
},
|
|
|
monitorReport: {
|
|
|
host: '10.66.4.25',
|
...
|
...
|
@@ -270,7 +273,7 @@ if (isProduction) { |
|
|
zippedArchive: true,
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
errorFile: {
|
|
|
name: 'error',
|
...
|
...
|
@@ -283,33 +286,46 @@ if (isProduction) { |
|
|
handleExceptions: true,
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
console: {
|
|
|
close: true,
|
|
|
level: 'info',
|
|
|
colorize: 'all',
|
|
|
prettyPrint: true,
|
|
|
debugStdout: true
|
|
|
}
|
|
|
}
|
|
|
debugStdout: true,
|
|
|
},
|
|
|
},
|
|
|
});
|
|
|
} else if (isTest) {
|
|
|
Object.assign(module.exports, {
|
|
|
assetUrl: '//cdn.yoho.cn/yohobuywap-node/',
|
|
|
domains: {
|
|
|
api: process.env.TEST_API || 'http://api-test3.dev.yohocorp.com/',
|
|
|
ufo: process.env.UFO_API || 'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/',
|
|
|
service: process.env.TEST_API || 'http://api-test3.dev.yohocorp.com/',
|
|
|
global: process.env.TEST_GLOBAL || 'http://global-test-soa.yohops.com:9999/',
|
|
|
store: process.env.TEST_STORE || 'http://192.168.102.210:8080/portal-gateway/wechat/',
|
|
|
liveApi: process.env.TEST_LIVE || 'http://testapi.live.yohops.com:9999/',
|
|
|
imSocket: process.env.TEST_IM_SOCKET || 'ws://socket.yohobuy.com:10240',
|
|
|
ufo:
|
|
|
process.env.UFO_API ||
|
|
|
'http://java-yohoufo-fore.test3.ingress.dev.yohocorp.com/ufo-gateway/',
|
|
|
service:
|
|
|
process.env.TEST_API || 'http://api-test3.dev.yohocorp.com/',
|
|
|
global:
|
|
|
process.env.TEST_GLOBAL ||
|
|
|
'http://global-test-soa.yohops.com:9999/',
|
|
|
store:
|
|
|
process.env.TEST_STORE ||
|
|
|
'http://192.168.102.210:8080/portal-gateway/wechat/',
|
|
|
liveApi:
|
|
|
process.env.TEST_LIVE || 'http://testapi.live.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/',
|
|
|
extstore: 'http://extstore-test1.yohops.com',
|
|
|
yohoNowApi: process.env.YOHO_NOW_API || 'http://yohonow-test.yohops.com:9999/',
|
|
|
yoLuck: process.env.YOLUCK_API || 'http://yoho-activity-platform.test3.ingress.dev.yohocorp.com'
|
|
|
yohoNowApi:
|
|
|
process.env.YOHO_NOW_API ||
|
|
|
'http://yohonow-test.yohops.com:9999/',
|
|
|
yoLuck:
|
|
|
process.env.YOLUCK_API ||
|
|
|
'http://yoho-activity-platform.test3.ingress.dev.yohocorp.com',
|
|
|
},
|
|
|
useCache: true,
|
|
|
alipayConfig: {
|
...
|
...
|
@@ -317,20 +333,26 @@ if (isProduction) { |
|
|
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',
|
|
|
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='
|
|
|
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',
|
|
|
notifyUrl:
|
|
|
(process.env.TEST_SERVICE ||
|
|
|
'http://service-test1.yohops.com:9999/') +
|
|
|
'payment/weixin_notify',
|
|
|
},
|
|
|
monitorReport: {
|
|
|
host: '192.168.102.22',
|
...
|
...
|
@@ -347,7 +369,7 @@ if (isProduction) { |
|
|
maxsize: Math.pow(1024, 3),
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
errorFile: {
|
|
|
name: 'error',
|
...
|
...
|
@@ -359,15 +381,15 @@ if (isProduction) { |
|
|
handleExceptions: true,
|
|
|
timestamp() {
|
|
|
return new Date().toString();
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
console: {
|
|
|
close: true,
|
|
|
level: 'info',
|
|
|
colorize: 'all',
|
|
|
prettyPrint: true,
|
|
|
debugStdout: true
|
|
|
}
|
|
|
}
|
|
|
debugStdout: true,
|
|
|
},
|
|
|
},
|
|
|
});
|
|
|
} |
...
|
...
|
|