Authored by 邱骏

update

... ... @@ -136,6 +136,7 @@ typings/
### YOHO ###
public/dist/yoho-activity-platform/*
config/common.js
public/build/bundle/*
public/css/*
public/bundle/*
... ...
... ... @@ -409,8 +409,6 @@ class ShoesModel extends global.yoho.BaseModel {
return Promise.resolve(friendList);
}
}
}
... ...
/**
* 系统配置
*
* @author hbomb qiqi.zhou@yoho.cn
* @date 2016/05/06
*/
const pkg = require('../package.json');
const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
module.exports = {
app: 'h5',
appVersion: '6.6.0', // 调用api的版本
port: 6006,
siteUrl: '//action.yoho.cn',
assetUrl: `/yoho-activity-platform/${pkg.version}/`,
yohoVerifyUdid: '0f626ede-0e17-460b-a8ea-069ee506e8e9',
domains: {
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/'
singleApi: 'http://api.yoho.cn/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
serviceNotify: 'http://service.yoho.cn/',
platformApi: 'http://172.16.6.210:8088/',
},
from: {
action: {
business_line: 'yohobuy'
}
},
corsAllowOrigin: [
'http://localhost:8081',
'http://localhost:9000',
'http://localhost:1234',
'http://localhost:63342',
'http://huodong.yoho.cn',
'http://yohood.ad.yoho.cn',
'http://ad.yoho.cn',
'https:/ad.yoho.cn',
'http://ad.yhurl.com',
'http://feature.yoho.cn',
'https://feature.yoho.cn'
],
useCache: false,
interfaceShunt: {
open: false
},
loggers: {
infoFile: {
name: 'info',
level: 'info',
filename: '/Data/log/yoho-activity-platform/info.log',
maxFiles: 7
},
errorFile: {
name: 'error',
level: 'error',
filename: '/Data/log/yoho-activity-platform/error.log',
handleExceptions: true,
maxFiles: 7
},
console: {
level: 'debug',
colorize: 'all',
prettyPrint: true
}
},
redis: {
connect: {
// host: '127.0.0.1',
host: '192.168.102.49',
port: '6379',
enable_offline_queue: false,
retry_strategy(options) {
if (options.error && options.error.code === 'ECONNREFUSED') {
console.log('connect redis server fail');
}
if (options.attempt < 10) {
return Math.min(options.attempt * 100, 1000);
} else if (options.attempt > 10 && options.attempt < 100) {
return 1000;
} else {
return 1000 * 10;
}
}
}
},
mysql: {
connect: {
host: 'localhost',
port: '3306',
user: 'root',
password: ''
},
database: 'yoho_activity_platform',
},
qiniu: {
ACCESS_KEY: 'BwWhoJN536BnV3CzlE20AjNKC9O2bP0l5tFpKsDU',
SECRET_KEY: '_x2VtO7fEmylgjojmLi7qwTBtRm30S8BrO0FxOPK',
BUCKET_NAME: 'cmsimg01'
},
yohoSecret: '3bd815162342d9733f06ab6811082c64',
wechat: {
appID: 'wx1fe49f08f41b6c26', // jsapi 用
appSecret: '1360c4a89275e1a4a4bbc8f6c5e44587',
token: 'weixin',
prefix: 'https://api.weixin.qq.com/cgi-bin/',
mpPrefix: 'https://api.weixin.qq.com/cgi-bin/',
},
wechatLogin: {
appID: 'wxb785b12717bc31e9',
appSecret: 'fb0bc348577b1e38576c6fe654da5135',
}
};
if (isProduction) {
Object.assign(module.exports, {
appName: 'm.yohobuy.com',
siteUrl: 'https://action.yoho.cn',
assetUrl: `/yoho-activity-platform/${pkg.version}/`,
domains: {
api: 'http://api.yoho.yohoops.org/',
service: 'http://api.yoho.yohoops.org/',
global: 'http://api-global.yohobuy.com',
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/',
platformApi: 'http://api.platform.yohoops.org'
},
corsAllowOrigin: [
'http://ad.yoho.cn',
'https://ad.yoho.cn',
'http://feature.yoho.cn',
'https://feature.yoho.cn',
'http://huodong.yoho.cn',
'https://huodong.yoho.cn',
'http://ad.yhurl.com'
],
redis: {
connect: {
host: 'redis.web.yohoops.org',
port: '6379',
password: 'redis9646',
enable_offline_queue: false,
retry_strategy(options) {
if (options.error && options.error.code === 'ECONNREFUSED') {
console.log('connect redis server fail');
}
if (options.attempt < 10) {
return Math.min(options.attempt * 100, 1000);
} else if (options.attempt > 10 && options.attempt < 100) {
return 1000;
} else {
return 1000 * 10;
}
}
}
},
useCache: true,
mysql: {
connect: {
host: '10.67.2.144',
port: '3307',
user: 'yh_vpc_bak',
password: 'yoho@2Y$^YpNb7hp'
},
database: 'yoho_activity_platform',
}
});
} else if (isTest) {
Object.assign(module.exports, {
appName: 'm.yohobuy.com for test',
siteUrl: '//action.yoho.cn',
assetUrl: `/yoho-activity-platform/${pkg.version}/`,
domains: {
api: process.env.TEST_API || 'http://api-test1.yohops.com:9999/',
service: process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/',
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/',
liveApi: process.env.TEST_LIVE || 'http://testapi.live.yohops.com:9999/',
singleApi: process.env.TEST_SINGLE || 'http://api-test1.yohops.com:9999/',
platformApi: 'http://192.168.102.48:8088/'
},
useCache: true,
mysql: {
connect: {
host: 'localhost',
port: '3306',
user: 'root',
password: ''
},
database: 'yoho_activity_platform',
}
});
}