Authored by 邱骏

update

@@ -136,6 +136,7 @@ typings/ @@ -136,6 +136,7 @@ typings/
136 136
137 ### YOHO ### 137 ### YOHO ###
138 public/dist/yoho-activity-platform/* 138 public/dist/yoho-activity-platform/*
  139 +config/common.js
139 public/build/bundle/* 140 public/build/bundle/*
140 public/css/* 141 public/css/*
141 public/bundle/* 142 public/bundle/*
@@ -409,8 +409,6 @@ class ShoesModel extends global.yoho.BaseModel { @@ -409,8 +409,6 @@ class ShoesModel extends global.yoho.BaseModel {
409 409
410 return Promise.resolve(friendList); 410 return Promise.resolve(friendList);
411 } 411 }
412 -  
413 -  
414 } 412 }
415 } 413 }
416 414
1 -/**  
2 - * 系统配置  
3 - *  
4 - * @author hbomb qiqi.zhou@yoho.cn  
5 - * @date 2016/05/06  
6 - */  
7 -  
8 -const pkg = require('../package.json');  
9 -  
10 -const isProduction = process.env.NODE_ENV === 'production';  
11 -const isTest = process.env.NODE_ENV === 'test';  
12 -  
13 -module.exports = {  
14 - app: 'h5',  
15 - appVersion: '6.6.0', // 调用api的版本  
16 - port: 6006,  
17 - siteUrl: '//action.yoho.cn',  
18 - assetUrl: `/yoho-activity-platform/${pkg.version}/`,  
19 -  
20 - yohoVerifyUdid: '0f626ede-0e17-460b-a8ea-069ee506e8e9',  
21 - domains: {  
22 - // api: 'http://api-test3.yohops.com:9999/',  
23 - // service: 'http://service-test3.yohops.com:9999/',  
24 - // singleApi: 'http://api-test3.yohops.com:9999/'  
25 -  
26 - singleApi: 'http://api.yoho.cn/',  
27 - api: 'http://api.yoho.cn/',  
28 - service: 'http://service.yoho.cn/',  
29 - serviceNotify: 'http://service.yoho.cn/',  
30 - platformApi: 'http://172.16.6.210:8088/',  
31 - },  
32 - from: {  
33 - action: {  
34 - business_line: 'yohobuy'  
35 - }  
36 - },  
37 - corsAllowOrigin: [  
38 - 'http://localhost:8081',  
39 - 'http://localhost:9000',  
40 - 'http://localhost:1234',  
41 - 'http://localhost:63342',  
42 - 'http://huodong.yoho.cn',  
43 - 'http://yohood.ad.yoho.cn',  
44 - 'http://ad.yoho.cn',  
45 - 'https:/ad.yoho.cn',  
46 - 'http://ad.yhurl.com',  
47 - 'http://feature.yoho.cn',  
48 - 'https://feature.yoho.cn'  
49 - ],  
50 - useCache: false,  
51 - interfaceShunt: {  
52 - open: false  
53 - },  
54 - loggers: {  
55 - infoFile: {  
56 - name: 'info',  
57 - level: 'info',  
58 - filename: '/Data/log/yoho-activity-platform/info.log',  
59 - maxFiles: 7  
60 - },  
61 - errorFile: {  
62 - name: 'error',  
63 - level: 'error',  
64 - filename: '/Data/log/yoho-activity-platform/error.log',  
65 - handleExceptions: true,  
66 - maxFiles: 7  
67 - },  
68 - console: {  
69 - level: 'debug',  
70 - colorize: 'all',  
71 - prettyPrint: true  
72 - }  
73 - },  
74 - redis: {  
75 - connect: {  
76 - // host: '127.0.0.1',  
77 -  
78 - host: '192.168.102.49',  
79 - port: '6379',  
80 - enable_offline_queue: false,  
81 - retry_strategy(options) {  
82 - if (options.error && options.error.code === 'ECONNREFUSED') {  
83 - console.log('connect redis server fail');  
84 - }  
85 -  
86 - if (options.attempt < 10) {  
87 - return Math.min(options.attempt * 100, 1000);  
88 - } else if (options.attempt > 10 && options.attempt < 100) {  
89 - return 1000;  
90 - } else {  
91 - return 1000 * 10;  
92 - }  
93 - }  
94 - }  
95 - },  
96 - mysql: {  
97 - connect: {  
98 - host: 'localhost',  
99 - port: '3306',  
100 - user: 'root',  
101 - password: ''  
102 - },  
103 - database: 'yoho_activity_platform',  
104 - },  
105 - qiniu: {  
106 - ACCESS_KEY: 'BwWhoJN536BnV3CzlE20AjNKC9O2bP0l5tFpKsDU',  
107 - SECRET_KEY: '_x2VtO7fEmylgjojmLi7qwTBtRm30S8BrO0FxOPK',  
108 - BUCKET_NAME: 'cmsimg01'  
109 - },  
110 - yohoSecret: '3bd815162342d9733f06ab6811082c64',  
111 - wechat: {  
112 - appID: 'wx1fe49f08f41b6c26', // jsapi 用  
113 - appSecret: '1360c4a89275e1a4a4bbc8f6c5e44587',  
114 - token: 'weixin',  
115 - prefix: 'https://api.weixin.qq.com/cgi-bin/',  
116 - mpPrefix: 'https://api.weixin.qq.com/cgi-bin/',  
117 - },  
118 - wechatLogin: {  
119 - appID: 'wxb785b12717bc31e9',  
120 - appSecret: 'fb0bc348577b1e38576c6fe654da5135',  
121 -  
122 - }  
123 -};  
124 -  
125 -if (isProduction) {  
126 - Object.assign(module.exports, {  
127 - appName: 'm.yohobuy.com',  
128 - siteUrl: 'https://action.yoho.cn',  
129 - assetUrl: `/yoho-activity-platform/${pkg.version}/`,  
130 - domains: {  
131 - api: 'http://api.yoho.yohoops.org/',  
132 - service: 'http://api.yoho.yohoops.org/',  
133 - global: 'http://api-global.yohobuy.com',  
134 - liveApi: 'http://api.live.yoho.cn/',  
135 - singleApi: 'http://single.yoho.cn/',  
136 - platformApi: 'http://api.platform.yohoops.org'  
137 - },  
138 - corsAllowOrigin: [  
139 - 'http://ad.yoho.cn',  
140 - 'https://ad.yoho.cn',  
141 - 'http://feature.yoho.cn',  
142 - 'https://feature.yoho.cn',  
143 - 'http://huodong.yoho.cn',  
144 - 'https://huodong.yoho.cn',  
145 - 'http://ad.yhurl.com'  
146 - ],  
147 - redis: {  
148 - connect: {  
149 - host: 'redis.web.yohoops.org',  
150 - port: '6379',  
151 - password: 'redis9646',  
152 - enable_offline_queue: false,  
153 - retry_strategy(options) {  
154 - if (options.error && options.error.code === 'ECONNREFUSED') {  
155 - console.log('connect redis server fail');  
156 - }  
157 -  
158 - if (options.attempt < 10) {  
159 - return Math.min(options.attempt * 100, 1000);  
160 - } else if (options.attempt > 10 && options.attempt < 100) {  
161 - return 1000;  
162 - } else {  
163 - return 1000 * 10;  
164 - }  
165 - }  
166 - }  
167 - },  
168 - useCache: true,  
169 - mysql: {  
170 - connect: {  
171 - host: '10.67.2.144',  
172 - port: '3307',  
173 - user: 'yh_vpc_bak',  
174 - password: 'yoho@2Y$^YpNb7hp'  
175 - },  
176 - database: 'yoho_activity_platform',  
177 - }  
178 - });  
179 -} else if (isTest) {  
180 - Object.assign(module.exports, {  
181 - appName: 'm.yohobuy.com for test',  
182 - siteUrl: '//action.yoho.cn',  
183 - assetUrl: `/yoho-activity-platform/${pkg.version}/`,  
184 - domains: {  
185 - api: process.env.TEST_API || 'http://api-test1.yohops.com:9999/',  
186 - service: process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/',  
187 - global: process.env.TEST_GLOBAL || 'http://global-test-soa.yohops.com:9999/',  
188 - store: process.env.TEST_STORE || 'http://192.168.102.210:8080/portal-gateway/',  
189 - liveApi: process.env.TEST_LIVE || 'http://testapi.live.yohops.com:9999/',  
190 - singleApi: process.env.TEST_SINGLE || 'http://api-test1.yohops.com:9999/',  
191 - platformApi: 'http://192.168.102.48:8088/'  
192 - },  
193 - useCache: true,  
194 - mysql: {  
195 - connect: {  
196 - host: 'localhost',  
197 - port: '3306',  
198 - user: 'root',  
199 - password: ''  
200 - },  
201 - database: 'yoho_activity_platform',  
202 - }  
203 - });  
204 -}